feat: fix some shit

This commit is contained in:
2023-08-06 18:06:09 +02:00
parent 6f650b568d
commit f482ebcce0
10 changed files with 23 additions and 12 deletions

View File

@ -37,6 +37,10 @@ export const createNewArticle: MenuEntry = {
},
visible: () => {
if (!getCookie("session_cookie")) return false;
if (
!globalThis?.location?.pathname?.includes("article") &&
globalThis?.location?.pathname !== "/"
) return false;
return true;
},
};

View File

@ -69,6 +69,10 @@ export const createNewMovie: MenuEntry = {
},
visible: () => {
if (!getCookie("session_cookie")) return false;
if (
!globalThis?.location?.pathname?.includes("movie") &&
globalThis?.location?.pathname !== "/"
) return false;
return true;
},
};