reading resources

This commit is contained in:
tangly1024
2023-06-04 21:37:45 +08:00
parent b492515eb9
commit 8ace4b2f64
5 changed files with 57 additions and 33 deletions

View File

@@ -18,7 +18,7 @@ import Loading from '@/components/Loading'
* @returns
*/
const Slug = memorize(props => {
const { theme, changeLoadingState } = useGlobal()
const { theme, setOnLoading } = useGlobal()
const { post, siteInfo } = props
const router = useRouter()
@@ -27,7 +27,7 @@ const Slug = memorize(props => {
const LayoutSlug = dynamic(() => import(`@/themes/${theme}`).then(async (m) => { return m.LayoutSlug }), { ssr: true, loading: () => <Loading /> })
useEffect(() => {
changeLoadingState(false)
setOnLoading(false)
if (post?.password && post?.password !== '') {
setLock(true)
} else {