@orion-studios/payload-studio 0.6.0-beta.22 → 0.6.0-beta.23
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 +4 -9
- package/dist/admin/client.mjs +2 -7
- package/package.json +1 -1
package/dist/admin/client.js
CHANGED
|
@@ -4042,6 +4042,7 @@ function AdminStudioDashboard(rawProps) {
|
|
|
4042
4042
|
// src/admin/components/studio/AdminStudioPagesListView.tsx
|
|
4043
4043
|
var import_react19 = require("react");
|
|
4044
4044
|
var import_link2 = __toESM(require("next/link"));
|
|
4045
|
+
var import_navigation3 = require("next/navigation");
|
|
4045
4046
|
var import_ui7 = require("@payloadcms/ui");
|
|
4046
4047
|
|
|
4047
4048
|
// src/admin/components/studio/AdminStudioNewPageView.tsx
|
|
@@ -4533,13 +4534,7 @@ var getPropString5 = (props, key, fallback) => {
|
|
|
4533
4534
|
};
|
|
4534
4535
|
function AdminStudioPagesListView(props) {
|
|
4535
4536
|
const adminBasePath = useAdminBasePath();
|
|
4536
|
-
const
|
|
4537
|
-
(0, import_react19.useEffect)(() => {
|
|
4538
|
-
const updatePathname = () => setPathname(window.location.pathname);
|
|
4539
|
-
updatePathname();
|
|
4540
|
-
window.addEventListener("popstate", updatePathname);
|
|
4541
|
-
return () => window.removeEventListener("popstate", updatePathname);
|
|
4542
|
-
}, []);
|
|
4537
|
+
const pathname = (0, import_navigation3.usePathname)();
|
|
4543
4538
|
const pagesPath = resolveAdminPath(adminBasePath, "/pages");
|
|
4544
4539
|
const nestedPagePath = pathname && pathname.startsWith(`${pagesPath}/`) ? pathname.slice(`${pagesPath}/`.length).split("/")[0] : "";
|
|
4545
4540
|
if (nestedPagePath === "new") {
|
|
@@ -6897,7 +6892,7 @@ function MediaListItem({
|
|
|
6897
6892
|
|
|
6898
6893
|
// src/admin-app/components/MediaUploadForm.tsx
|
|
6899
6894
|
var import_react27 = require("react");
|
|
6900
|
-
var
|
|
6895
|
+
var import_navigation4 = require("next/navigation");
|
|
6901
6896
|
|
|
6902
6897
|
// src/shared/clientImageUploadOptimization.ts
|
|
6903
6898
|
var MAX_DIRECT_UPLOAD_BYTES = 4e6;
|
|
@@ -7032,7 +7027,7 @@ var parseUploadError = async (response) => {
|
|
|
7032
7027
|
return fallback;
|
|
7033
7028
|
};
|
|
7034
7029
|
function MediaUploadForm() {
|
|
7035
|
-
const router = (0,
|
|
7030
|
+
const router = (0, import_navigation4.useRouter)();
|
|
7036
7031
|
const fileInputRef = (0, import_react27.useRef)(null);
|
|
7037
7032
|
const [alt, setAlt] = (0, import_react27.useState)("");
|
|
7038
7033
|
const [file, setFile] = (0, import_react27.useState)(null);
|
package/dist/admin/client.mjs
CHANGED
|
@@ -2669,6 +2669,7 @@ function AdminStudioDashboard(rawProps) {
|
|
|
2669
2669
|
// src/admin/components/studio/AdminStudioPagesListView.tsx
|
|
2670
2670
|
import { useEffect as useEffect9, useMemo as useMemo5, useState as useState10 } from "react";
|
|
2671
2671
|
import Link2 from "next/link";
|
|
2672
|
+
import { usePathname as usePathname3 } from "next/navigation";
|
|
2672
2673
|
import { useAuth as useAuth5 } from "@payloadcms/ui";
|
|
2673
2674
|
|
|
2674
2675
|
// src/admin/components/studio/AdminStudioNewPageView.tsx
|
|
@@ -3160,13 +3161,7 @@ var getPropString5 = (props, key, fallback) => {
|
|
|
3160
3161
|
};
|
|
3161
3162
|
function AdminStudioPagesListView(props) {
|
|
3162
3163
|
const adminBasePath = useAdminBasePath();
|
|
3163
|
-
const
|
|
3164
|
-
useEffect9(() => {
|
|
3165
|
-
const updatePathname = () => setPathname(window.location.pathname);
|
|
3166
|
-
updatePathname();
|
|
3167
|
-
window.addEventListener("popstate", updatePathname);
|
|
3168
|
-
return () => window.removeEventListener("popstate", updatePathname);
|
|
3169
|
-
}, []);
|
|
3164
|
+
const pathname = usePathname3();
|
|
3170
3165
|
const pagesPath = resolveAdminPath(adminBasePath, "/pages");
|
|
3171
3166
|
const nestedPagePath = pathname && pathname.startsWith(`${pagesPath}/`) ? pathname.slice(`${pagesPath}/`.length).split("/")[0] : "";
|
|
3172
3167
|
if (nestedPagePath === "new") {
|
package/package.json
CHANGED