diff --git a/src/components/admin/ControlBar.tsx b/src/components/admin/ControlBar.tsx new file mode 100644 index 0000000..384ad7f --- /dev/null +++ b/src/components/admin/ControlBar.tsx @@ -0,0 +1,20 @@ +const AdminBarLayout = ({ + actions, + children, +}: { + actions: JSX.Element | JSX.Element[]; + children: JSX.Element | JSX.Element[]; +}) => { + return ( +
+
+

+ Admin Mode +

+
+ {children} +
+ ); +}; + +export { AdminBarLayout }; diff --git a/src/pages/resources/[id].tsx b/src/pages/resources/[id].tsx index a727eaf..eeaed03 100644 --- a/src/pages/resources/[id].tsx +++ b/src/pages/resources/[id].tsx @@ -10,6 +10,7 @@ import Image from "next/image"; import Link from "next/link"; import Footer from "~/components/Footer"; import Header from "~/components/Header"; +import { AdminBarLayout } from "~/components/admin/ControlBar"; export const getStaticPaths = async () => { const resources = await prisma.auditoryResource.findMany({ @@ -133,35 +134,37 @@ const ResourceViewPage = ( <>
-
-
-
-
-

Links

- + +
+
+
+
+

Links

+ +
+
+
+ +
+ +
+
+ + Ages {resourceQuery.data.ages.min} + {resourceQuery.data.ages.max >= 100 + ? "+" + : `-${resourceQuery.data.ages.max}`} + +
-
- -
- -
-
- - Ages {resourceQuery.data.ages.min} - {resourceQuery.data.ages.max >= 100 - ? "+" - : `-${resourceQuery.data.ages.max}`} - -
-
-
-
+ +