@orion-studios/payload-studio 0.6.0-beta.32 → 0.6.0-beta.34
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/dist/admin/client.js
CHANGED
|
@@ -3059,14 +3059,21 @@ function AdminShellClient({
|
|
|
3059
3059
|
onLogout,
|
|
3060
3060
|
storageKey = "orion-admin-shell-collapsed"
|
|
3061
3061
|
}) {
|
|
3062
|
-
const [collapsed, setCollapsed] = (0, import_react14.useState)(
|
|
3062
|
+
const [collapsed, setCollapsed] = (0, import_react14.useState)(() => {
|
|
3063
|
+
if (typeof window === "undefined") {
|
|
3064
|
+
return true;
|
|
3065
|
+
}
|
|
3066
|
+
try {
|
|
3067
|
+
return window.localStorage.getItem(storageKey) === "1";
|
|
3068
|
+
} catch {
|
|
3069
|
+
return false;
|
|
3070
|
+
}
|
|
3071
|
+
});
|
|
3063
3072
|
const [loggingOut, setLoggingOut] = (0, import_react14.useState)(false);
|
|
3064
3073
|
(0, import_react14.useEffect)(() => {
|
|
3065
3074
|
try {
|
|
3066
3075
|
const stored = window.localStorage.getItem(storageKey);
|
|
3067
|
-
|
|
3068
|
-
setCollapsed(true);
|
|
3069
|
-
}
|
|
3076
|
+
setCollapsed(stored === "1");
|
|
3070
3077
|
} catch {
|
|
3071
3078
|
}
|
|
3072
3079
|
}, [storageKey]);
|
package/dist/admin/client.mjs
CHANGED
package/dist/admin-app/client.js
CHANGED
|
@@ -122,14 +122,21 @@ function AdminShellClient({
|
|
|
122
122
|
onLogout,
|
|
123
123
|
storageKey = "orion-admin-shell-collapsed"
|
|
124
124
|
}) {
|
|
125
|
-
const [collapsed, setCollapsed] = (0, import_react.useState)(
|
|
125
|
+
const [collapsed, setCollapsed] = (0, import_react.useState)(() => {
|
|
126
|
+
if (typeof window === "undefined") {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
return window.localStorage.getItem(storageKey) === "1";
|
|
131
|
+
} catch {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
126
135
|
const [loggingOut, setLoggingOut] = (0, import_react.useState)(false);
|
|
127
136
|
(0, import_react.useEffect)(() => {
|
|
128
137
|
try {
|
|
129
138
|
const stored = window.localStorage.getItem(storageKey);
|
|
130
|
-
|
|
131
|
-
setCollapsed(true);
|
|
132
|
-
}
|
|
139
|
+
setCollapsed(stored === "1");
|
|
133
140
|
} catch {
|
|
134
141
|
}
|
|
135
142
|
}, [storageKey]);
|
|
@@ -103,14 +103,21 @@ function AdminShellClient({
|
|
|
103
103
|
onLogout,
|
|
104
104
|
storageKey = "orion-admin-shell-collapsed"
|
|
105
105
|
}) {
|
|
106
|
-
const [collapsed, setCollapsed] = useState(
|
|
106
|
+
const [collapsed, setCollapsed] = useState(() => {
|
|
107
|
+
if (typeof window === "undefined") {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
try {
|
|
111
|
+
return window.localStorage.getItem(storageKey) === "1";
|
|
112
|
+
} catch {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
107
116
|
const [loggingOut, setLoggingOut] = useState(false);
|
|
108
117
|
useEffect(() => {
|
|
109
118
|
try {
|
|
110
119
|
const stored = window.localStorage.getItem(storageKey);
|
|
111
|
-
|
|
112
|
-
setCollapsed(true);
|
|
113
|
-
}
|
|
120
|
+
setCollapsed(stored === "1");
|
|
114
121
|
} catch {
|
|
115
122
|
}
|
|
116
123
|
}, [storageKey]);
|
package/package.json
CHANGED