mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-19 20:20:16 +09:00
Merge pull request #4514 from SukkaW/fix-ls-performance
perf: avoid read localStorage on every render
This commit is contained in:
commit
51f7daaeaf
@ -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