diff --git a/src/components/ui/Navbar.tsx b/src/components/ui/Navbar.tsx index 973013b..324d972 100644 --- a/src/components/ui/Navbar.tsx +++ b/src/components/ui/Navbar.tsx @@ -18,7 +18,7 @@ const DesktopLinks: FC = () => { {page.name} diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 2715a17..6584b01 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,12 +1,11 @@ // create a 404 next js page using tailwind -import Layout from '@/components/ui/Layout'; import { NextPage } from 'next'; import Head from 'next/head'; const NotFound: NextPage = () => { return ( - + <> 404 Page Not Found @@ -17,7 +16,7 @@ const NotFound: NextPage = () => { Sorry, the page you are looking for does not exist. - + ); }; diff --git a/src/pages/500.tsx b/src/pages/500.tsx index b8f3707..cf54a50 100644 --- a/src/pages/500.tsx +++ b/src/pages/500.tsx @@ -1,10 +1,9 @@ -import Layout from '@/components/ui/Layout'; import { NextPage } from 'next'; import Head from 'next/head'; const ServerErrorPage: NextPage = () => { return ( - + <> 500 Internal Server Error @@ -15,7 +14,7 @@ const ServerErrorPage: NextPage = () => { Please try again later or contact us if the problem persists. - + ); }; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 285c9ef..a46c2fb 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -7,6 +7,7 @@ import { themeChange } from 'theme-change'; import { Space_Grotesk } from 'next/font/google'; import Head from 'next/head'; +import Layout from '@/components/ui/Layout'; const spaceGrotesk = Space_Grotesk({ subsets: ['latin'], @@ -34,7 +35,9 @@ export default function App({ Component, pageProps }: AppProps) { /> - + + + ); diff --git a/src/pages/account/index.tsx b/src/pages/account/index.tsx index 2a6db58..bdf5020 100644 --- a/src/pages/account/index.tsx +++ b/src/pages/account/index.tsx @@ -1,15 +1,12 @@ -import Layout from '@/components/ui/Layout'; import { NextPage } from 'next'; interface AccountPageProps {} const AccountPage: NextPage = () => { return ( - -
-

Account Page

-
-
+
+

Account Page

+
); }; diff --git a/src/pages/beers/[id]/edit.tsx b/src/pages/beers/[id]/edit.tsx index 79374d6..a0e65f3 100644 --- a/src/pages/beers/[id]/edit.tsx +++ b/src/pages/beers/[id]/edit.tsx @@ -2,7 +2,6 @@ import { NextPage } from 'next'; import Head from 'next/head'; import React from 'react'; -import Layout from '@/components/ui/Layout'; import withPageAuthRequired from '@/getServerSideProps/withPageAuthRequired'; import getBeerPostById from '@/services/BeerPost/getBeerPostById'; import beerPostQueryResult from '@/services/BeerPost/schema/BeerPostQueryResult'; @@ -19,7 +18,7 @@ const EditPage: NextPage = ({ beerPost }) => { const pageTitle = `Edit \u201c${beerPost.name}\u201d`; return ( - + <> {pageTitle} @@ -41,7 +40,7 @@ const EditPage: NextPage = ({ beerPost }) => { }} /> - + ); }; diff --git a/src/pages/beers/[id]/index.tsx b/src/pages/beers/[id]/index.tsx index 21b5e46..d0b1fc8 100644 --- a/src/pages/beers/[id]/index.tsx +++ b/src/pages/beers/[id]/index.tsx @@ -5,7 +5,6 @@ import Image from 'next/image'; import BeerInfoHeader from '@/components/BeerById/BeerInfoHeader'; import BeerPostCommentsSection from '@/components/BeerById/BeerPostCommentsSection'; import BeerRecommendations from '@/components/BeerById/BeerRecommendations'; -import Layout from '@/components/ui/Layout'; import getBeerPostById from '@/services/BeerPost/getBeerPostById'; import getBeerRecommendations from '@/services/BeerPost/getBeerRecommendations'; @@ -37,7 +36,7 @@ const BeerByIdPage: NextPage = ({ beerPost, beerRecommendations } {beerPost.name} - + <>
= ({ beerPost, beerRecommendations }
-
+ ); }; diff --git a/src/pages/beers/create.tsx b/src/pages/beers/create.tsx index be2183a..861d276 100644 --- a/src/pages/beers/create.tsx +++ b/src/pages/beers/create.tsx @@ -1,6 +1,6 @@ import CreateBeerPostForm from '@/components/CreateBeerPostForm'; import FormPageLayout from '@/components/ui/forms/FormPageLayout'; -import Layout from '@/components/ui/Layout'; + import withPageAuthRequired from '@/getServerSideProps/withPageAuthRequired'; import DBClient from '@/prisma/DBClient'; import getAllBreweryPosts from '@/services/BreweryPost/getAllBreweryPosts'; @@ -17,16 +17,14 @@ interface CreateBeerPageProps { const Create: NextPage = ({ breweries, types }) => { return ( - - - - - + + + ); }; diff --git a/src/pages/beers/index.tsx b/src/pages/beers/index.tsx index 740347e..31b5c8a 100644 --- a/src/pages/beers/index.tsx +++ b/src/pages/beers/index.tsx @@ -1,5 +1,5 @@ import { NextPage } from 'next'; -import Layout from '@/components/ui/Layout'; + import BeerCard from '@/components/BeerIndex/BeerCard'; import Head from 'next/head'; import Link from 'next/link'; @@ -32,7 +32,7 @@ const BeerPage: NextPage = () => { const pageRef: MutableRefObject = useRef(null); return ( - + <> Beer @@ -105,7 +105,7 @@ const BeerPage: NextPage = () => { )} - + ); }; diff --git a/src/pages/beers/search.tsx b/src/pages/beers/search.tsx index 21827bf..29b65a6 100644 --- a/src/pages/beers/search.tsx +++ b/src/pages/beers/search.tsx @@ -1,4 +1,3 @@ -import Layout from '@/components/ui/Layout'; import { NextPage } from 'next'; import { useRouter } from 'next/router'; @@ -43,36 +42,34 @@ const SearchPage: NextPage = () => { const showSearchResults = !isLoading && searchResults && !searchError; return ( - -
-
-
-
- What are you looking for? - -
-
- -
- {!showSearchResults ? ( - - ) : ( -
- {searchResults.map((result) => { - return ; - })} -
- )} +
+
+
+
+ What are you looking for? +
+ +
+ {!showSearchResults ? ( + + ) : ( +
+ {searchResults.map((result) => { + return ; + })} +
+ )} +
- +
); }; diff --git a/src/pages/breweries/[id].tsx b/src/pages/breweries/[id].tsx index 7565523..61ade9e 100644 --- a/src/pages/breweries/[id].tsx +++ b/src/pages/breweries/[id].tsx @@ -1,5 +1,3 @@ -import Layout from '@/components/ui/Layout'; - import getBreweryPostById from '@/services/BreweryPost/getBreweryPostById'; import BreweryPostQueryResult from '@/services/BreweryPost/types/BreweryPostQueryResult'; import { GetServerSideProps, NextPage } from 'next'; @@ -11,9 +9,9 @@ interface BreweryPageProps { const BreweryByIdPage: NextPage = ({ breweryPost }) => { return ( - + <>

{breweryPost.name}

-
+ ); }; diff --git a/src/pages/breweries/index.tsx b/src/pages/breweries/index.tsx index f7217f9..90258ce 100644 --- a/src/pages/breweries/index.tsx +++ b/src/pages/breweries/index.tsx @@ -3,7 +3,7 @@ import { GetServerSideProps, NextPage } from 'next'; import Link from 'next/link'; import getAllBreweryPosts from '@/services/BreweryPost/getAllBreweryPosts'; import BreweryPostQueryResult from '@/services/BreweryPost/types/BreweryPostQueryResult'; -import Layout from '@/components/ui/Layout'; + import { FC } from 'react'; import Image from 'next/image'; import { z } from 'zod'; @@ -41,7 +41,7 @@ const BreweryCard: FC<{ brewery: z.infer }> = ({ const BreweryPage: NextPage = ({ breweryPosts }) => { return ( - + <>
@@ -56,7 +56,7 @@ const BreweryPage: NextPage = ({ breweryPosts }) => {
- + ); }; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index afc8db9..1fcca27 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,4 +1,3 @@ -import Layout from '@/components/ui/Layout'; import { NextPage } from 'next'; import Head from 'next/head'; @@ -12,19 +11,18 @@ const Home: NextPage = () => { content="The Biergarten App is an app for beer lovers to share their favourite brews and breweries with like-minded people online." /> - -
-
-

- The Biergarten App -

-

- An app for beer lovers to share their favourite brews and breweries with - like-minded people online. -

-
+ +
+
+

+ The Biergarten App +

+

+ An app for beer lovers to share their favourite brews and breweries with + like-minded people online. +

- +
); }; diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index ffbbb7b..b7d75bf 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -1,5 +1,5 @@ import { NextPage } from 'next'; -import Layout from '@/components/ui/Layout'; + import LoginForm from '@/components/Login/LoginForm'; import Image from 'next/image'; @@ -12,7 +12,7 @@ import useRedirectWhenLoggedIn from '@/hooks/useRedirectIfLoggedIn'; const LoginPage: NextPage = () => { useRedirectWhenLoggedIn(); return ( - + <> Login @@ -49,7 +49,7 @@ const LoginPage: NextPage = () => {
-
+ ); }; diff --git a/src/pages/register/index.tsx b/src/pages/register/index.tsx index a021de9..9559b45 100644 --- a/src/pages/register/index.tsx +++ b/src/pages/register/index.tsx @@ -1,6 +1,5 @@ import RegisterUserForm from '@/components/RegisterUserForm'; import FormPageLayout from '@/components/ui/forms/FormPageLayout'; -import Layout from '@/components/ui/Layout'; import useRedirectWhenLoggedIn from '@/hooks/useRedirectIfLoggedIn'; import { NextPage } from 'next'; @@ -11,7 +10,7 @@ const RegisterUserPage: NextPage = () => { useRedirectWhenLoggedIn(); return ( - + <> Register User @@ -24,7 +23,7 @@ const RegisterUserPage: NextPage = () => { > - + ); }; diff --git a/src/pages/user/current.tsx b/src/pages/user/current.tsx index 209f477..c152068 100644 --- a/src/pages/user/current.tsx +++ b/src/pages/user/current.tsx @@ -1,4 +1,3 @@ -import Layout from '@/components/ui/Layout'; import Spinner from '@/components/ui/Spinner'; import withPageAuthRequired from '@/getServerSideProps/withPageAuthRequired'; import UserContext from '@/contexts/userContext'; @@ -18,24 +17,22 @@ const ProtectedPage: NextPage = () => { const isDesktop = useMediaQuery('(min-width: 768px)'); return ( - -
- {isLoading && } - {user && !isLoading && ( - <> -

- Good {isMorning && 'morning'} - {isAfternoon && 'afternoon'} - {isEvening && 'evening'} - {`, ${user?.firstName}!`} -

-

- Welcome to the Biergarten App! -

- - )} -
-
+
+ {isLoading && } + {user && !isLoading && ( + <> +

+ Good {isMorning && 'morning'} + {isAfternoon && 'afternoon'} + {isEvening && 'evening'} + {`, ${user?.firstName}!`} +

+

+ Welcome to the Biergarten App! +

+ + )} +
); };