@@ -53,14 +53,14 @@ export default async function RootPortfolioProjectPage({
|
||||
params,
|
||||
}: RootPortfolioProjectPageProps) {
|
||||
if (!isAdminAuthenticated()) {
|
||||
redirect("/root");
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
async function logoutAction() {
|
||||
"use server";
|
||||
|
||||
clearAdminSessionCookie();
|
||||
redirect("/root");
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
const [categories, mediaOptions, project] = await Promise.all([
|
||||
@@ -70,7 +70,7 @@ export default async function RootPortfolioProjectPage({
|
||||
]);
|
||||
|
||||
if (!project) {
|
||||
redirect("/root/portfolio?error=Project+not+found.");
|
||||
redirect("/portfolio?error=Project+not+found.");
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -90,7 +90,7 @@ export default async function RootPortfolioProjectPage({
|
||||
mediaOptions={mediaOptions}
|
||||
project={project}
|
||||
formId="portfolio-project-form"
|
||||
redirectPath={`/root/portfolio/projects/${project.id}`}
|
||||
redirectPath={`/portfolio/projects/${project.id}`}
|
||||
/>
|
||||
</MotionFade>
|
||||
|
||||
|
||||
@@ -26,14 +26,14 @@ const copy = {
|
||||
|
||||
export default async function RootNewPortfolioProjectPage() {
|
||||
if (!isAdminAuthenticated()) {
|
||||
redirect("/root");
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
async function logoutAction() {
|
||||
"use server";
|
||||
|
||||
clearAdminSessionCookie();
|
||||
redirect("/root");
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
const [categories, mediaOptions] = await Promise.all([
|
||||
@@ -57,7 +57,7 @@ export default async function RootNewPortfolioProjectPage() {
|
||||
categories={categories}
|
||||
mediaOptions={mediaOptions}
|
||||
formId="portfolio-project-form"
|
||||
redirectPath="/root/portfolio/projects/new"
|
||||
redirectPath="/portfolio/projects/new"
|
||||
/>
|
||||
</MotionFade>
|
||||
</div>
|
||||
|
||||
@@ -31,14 +31,14 @@ export default async function RootPortfolioProjectsPage({
|
||||
searchParams,
|
||||
}: RootPortfolioProjectsPageProps) {
|
||||
if (!isAdminAuthenticated()) {
|
||||
redirect("/root");
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
async function logoutAction() {
|
||||
"use server";
|
||||
|
||||
clearAdminSessionCookie();
|
||||
redirect("/root");
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
const selectedCategory = searchParams?.category && searchParams.category !== "__all__"
|
||||
|
||||
Reference in New Issue
Block a user