Wire admin studio SSR and search infrastructure
This commit is contained in:
@@ -18,10 +18,13 @@ export default function ProfileCoverEditor({
|
||||
const [removing, setRemoving] = useState(false)
|
||||
const [position, setPosition] = useState(coverPosition ?? 50)
|
||||
|
||||
const csrfToken = useMemo(
|
||||
() => document.querySelector('meta[name="csrf-token"]')?.content ?? '',
|
||||
[]
|
||||
)
|
||||
const csrfToken = useMemo(() => {
|
||||
if (typeof document === 'undefined') {
|
||||
return ''
|
||||
}
|
||||
|
||||
return document.querySelector('meta[name="csrf-token"]')?.content ?? ''
|
||||
}, [])
|
||||
|
||||
if (!isOpen) {
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user