@stoker-platform/web-app 0.5.94 → 0.5.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/RecordSidebar.tsx +4 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/RecordSidebar.tsx
CHANGED
|
@@ -45,6 +45,7 @@ export const RecordSidebar = ({
|
|
|
45
45
|
const [relationTitles, setRelationTitles] = useState<Record<string, string>>({})
|
|
46
46
|
const [relationIcons, setRelationIcons] = useState<Record<string, React.FC>>({})
|
|
47
47
|
const [assignable, setAssignable] = useState<Assignable[]>([])
|
|
48
|
+
const [isInitialized, setIsInitialized] = useState(false)
|
|
48
49
|
|
|
49
50
|
useEffect(() => {
|
|
50
51
|
;(async () => {
|
|
@@ -68,6 +69,7 @@ export const RecordSidebar = ({
|
|
|
68
69
|
const assignable = await tryPromise(customization.admin?.assignable)
|
|
69
70
|
setAssignable(assignable)
|
|
70
71
|
}
|
|
72
|
+
setIsInitialized(true)
|
|
71
73
|
})()
|
|
72
74
|
}, [])
|
|
73
75
|
|
|
@@ -126,6 +128,8 @@ export const RecordSidebar = ({
|
|
|
126
128
|
const anyCustomActive = customItems.some((item) => location.pathname.includes(item.page))
|
|
127
129
|
const anyRelationActive = relationItems.some((item) => location.pathname.includes(item.page))
|
|
128
130
|
|
|
131
|
+
if (!isInitialized) return null
|
|
132
|
+
|
|
129
133
|
return (
|
|
130
134
|
<Sidebar
|
|
131
135
|
collapsible="none"
|