diff --git a/src/pages/resources/[id]/index.tsx b/src/pages/resources/[id]/index.tsx index 56bf387..43fc1e2 100644 --- a/src/pages/resources/[id]/index.tsx +++ b/src/pages/resources/[id]/index.tsx @@ -130,9 +130,41 @@ const ResourceViewPage = ( const resourceQuery = api.auditoryResource.byId.useQuery({ id }); const router = useRouter(); - if (!resourceQuery.data) { - return <>; - } + const ConditionalView = () => { + if (!resourceQuery.data) { + return <>; + } + + return ( +
+
+
+

Links

+ +
+
+
+ +
+ +
+
+ + Ages {resourceQuery.data.ages.min} + {resourceQuery.data.ages.max >= 100 + ? "+" + : `-${resourceQuery.data.ages.max}`} + +
+
+
+ ); + }; return ( <> @@ -148,33 +180,7 @@ const ResourceViewPage = ( } >
-
-
-
-

Links

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