mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-04 23:16:53 +00:00
bug:密码一闪而过
This commit is contained in:
@@ -35,9 +35,10 @@ const Slug = props => {
|
||||
}
|
||||
|
||||
// 文章锁🔐
|
||||
const [lock, setLock] = useState(true)
|
||||
const [lock, setLock] = useState(post.password && post.password !== '')
|
||||
console.log('lock 默认值', lock)
|
||||
useEffect(() => {
|
||||
if (post && post.password && post.password !== '') {
|
||||
if (post.password && post.password !== '') {
|
||||
setLock(true)
|
||||
} else {
|
||||
setLock(false)
|
||||
|
||||
Reference in New Issue
Block a user