mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-20 04:30:17 +09:00
perf: avoid read localStorage on every render
This commit is contained in:
parent
af3ebacee6
commit
2322851ac4
@ -405,7 +405,7 @@ export function MaskPage() {
|
||||
const chatStore = useChatStore();
|
||||
|
||||
const [filterLang, setFilterLang] = useState<Lang | undefined>(
|
||||
localStorage.getItem("Mask-language") as Lang | undefined,
|
||||
() => localStorage.getItem("Mask-language") as Lang | undefined,
|
||||
);
|
||||
useEffect(() => {
|
||||
if (filterLang) {
|
||||
|
Loading…
Reference in New Issue
Block a user