fix: eliminate home page flash by using cached content on initial render
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -82,8 +82,9 @@ const Home = () => {
|
||||
const { i18n } = useTranslation();
|
||||
const [statusState] = useContext(StatusContext);
|
||||
const actualTheme = useActualTheme();
|
||||
const [homePageContentLoaded, setHomePageContentLoaded] = useState(false);
|
||||
const [homePageContent, setHomePageContent] = useState('');
|
||||
const cachedContent = localStorage.getItem('home_page_content') || '';
|
||||
const [homePageContentLoaded, setHomePageContentLoaded] = useState(!!cachedContent);
|
||||
const [homePageContent, setHomePageContent] = useState(cachedContent);
|
||||
const [noticeVisible, setNoticeVisible] = useState(false);
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user