diff --git a/public/favicon/about.txt b/public/favicon/about.txt new file mode 100644 index 0000000..7207339 --- /dev/null +++ b/public/favicon/about.txt @@ -0,0 +1,6 @@ +This favicon was generated using the following graphics from Twitter Twemoji: + +- Graphics Title: 1f37a.svg +- Graphics Author: Copyright 2020 Twitter, Inc and other contributors (https://github.com/twitter/twemoji) +- Graphics Source: https://github.com/twitter/twemoji/blob/master/assets/svg/1f37a.svg +- Graphics License: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/) diff --git a/public/favicon/android-chrome-192x192.png b/public/favicon/android-chrome-192x192.png new file mode 100644 index 0000000..e427b61 Binary files /dev/null and b/public/favicon/android-chrome-192x192.png differ diff --git a/public/favicon/android-chrome-512x512.png b/public/favicon/android-chrome-512x512.png new file mode 100644 index 0000000..61420f9 Binary files /dev/null and b/public/favicon/android-chrome-512x512.png differ diff --git a/public/favicon/apple-touch-icon.png b/public/favicon/apple-touch-icon.png new file mode 100644 index 0000000..d0707f0 Binary files /dev/null and b/public/favicon/apple-touch-icon.png differ diff --git a/public/favicon/favicon-16x16.png b/public/favicon/favicon-16x16.png new file mode 100644 index 0000000..06ea49e Binary files /dev/null and b/public/favicon/favicon-16x16.png differ diff --git a/public/favicon/favicon-32x32.png b/public/favicon/favicon-32x32.png new file mode 100644 index 0000000..9b31c2d Binary files /dev/null and b/public/favicon/favicon-32x32.png differ diff --git a/public/favicon/favicon.ico b/public/favicon/favicon.ico new file mode 100644 index 0000000..124c369 Binary files /dev/null and b/public/favicon/favicon.ico differ diff --git a/public/favicon/site.webmanifest b/public/favicon/site.webmanifest new file mode 100644 index 0000000..45dc8a2 --- /dev/null +++ b/public/favicon/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/src/components/BeerById/BeerInfoHeader.tsx b/src/components/BeerById/BeerInfoHeader.tsx index 990a108..3a9979d 100644 --- a/src/components/BeerById/BeerInfoHeader.tsx +++ b/src/components/BeerById/BeerInfoHeader.tsx @@ -40,10 +40,7 @@ const BeerInfoHeader: FC<{ {isPostOwner && (
- +
diff --git a/src/components/BeerById/BeerPostCommentsSection.tsx b/src/components/BeerById/BeerPostCommentsSection.tsx index 8340f67..3211315 100644 --- a/src/components/BeerById/BeerPostCommentsSection.tsx +++ b/src/components/BeerById/BeerPostCommentsSection.tsx @@ -52,7 +52,7 @@ const BeerPostCommentsSection: FC = ({ beerPost }) {user ? ( ) : ( -
+
Log in to leave a comment.
)} @@ -73,7 +73,7 @@ const BeerPostCommentsSection: FC = ({ beerPost }) {!!comments.length && (
{comments.map((comment, index) => { - const isLastComment = index === comments.length - 1; + const isPenulitmateComment = index === comments.length - 2; /** * Attach a ref to the last comment in the list. When it comes into @@ -81,7 +81,7 @@ const BeerPostCommentsSection: FC = ({ beerPost }) */ return (
@@ -94,9 +94,7 @@ const BeerPostCommentsSection: FC = ({ beerPost }) * If there are more comments to load, show a loading component with a * skeleton loader and a loading spinner. */ - !!isLoadingMore && ( - - ) + !!isLoadingMore && } { diff --git a/src/components/BeerById/BeerRecommendations.tsx b/src/components/BeerById/BeerRecommendations.tsx index 758404a..57b43a1 100644 --- a/src/components/BeerById/BeerRecommendations.tsx +++ b/src/components/BeerById/BeerRecommendations.tsx @@ -20,13 +20,13 @@ const BeerRecommendations: FunctionComponent = ({ -

+

{beerPost.brewery.name}

-
+
{beerPost.abv}% ABV {beerPost.ibu} IBU
diff --git a/src/components/BeerById/CommentCardBody.tsx b/src/components/BeerById/CommentCardBody.tsx index bd28efa..f8102f6 100644 --- a/src/components/BeerById/CommentCardBody.tsx +++ b/src/components/BeerById/CommentCardBody.tsx @@ -35,7 +35,7 @@ const CommentCardDropdown: FC = ({ comment, mutate }) => { }; return ( -
+
@@ -45,7 +45,12 @@ const CommentCardDropdown: FC = ({ comment, mutate }) => { >
  • {isCommentOwner ? ( - + <> + + + ) : ( )} diff --git a/src/components/BeerIndex/BeerCard.tsx b/src/components/BeerIndex/BeerCard.tsx index aae767f..ef03600 100644 --- a/src/components/BeerIndex/BeerCard.tsx +++ b/src/components/BeerIndex/BeerCard.tsx @@ -27,12 +27,12 @@ const BeerCard: FC<{ post: z.infer }> = ({ post }) =
    -

    +

    {post.name}

    -

    +

    {post.brewery.name}

    diff --git a/src/components/RegisterUserForm.tsx b/src/components/RegisterUserForm.tsx index ab092ae..f5cdd58 100644 --- a/src/components/RegisterUserForm.tsx +++ b/src/components/RegisterUserForm.tsx @@ -48,8 +48,8 @@ const RegisterUserForm: FC = () => { )}
    -
    -
    +
    +
    First name {errors.firstName?.message} @@ -66,7 +66,7 @@ const RegisterUserForm: FC = () => {
    -
    +
    Last name {errors.lastName?.message} @@ -84,8 +84,8 @@ const RegisterUserForm: FC = () => {
    -
    -
    +
    +
    email {errors.email?.message} @@ -101,7 +101,7 @@ const RegisterUserForm: FC = () => { />
    -
    +
    username {errors.username?.message} @@ -119,8 +119,8 @@ const RegisterUserForm: FC = () => {
    -
    -
    +
    +
    password {errors.password?.message} @@ -136,7 +136,7 @@ const RegisterUserForm: FC = () => { />
    -
    +
    confirm password {errors.confirmPassword?.message} diff --git a/src/components/ui/Layout.tsx b/src/components/ui/Layout.tsx index 3ff6558..8358a7e 100644 --- a/src/components/ui/Layout.tsx +++ b/src/components/ui/Layout.tsx @@ -5,7 +5,7 @@ const Layout: FC<{ children: ReactNode }> = ({ children }) => { return (
    -
    +
    {children}
    diff --git a/src/components/ui/forms/FormPageLayout.tsx b/src/components/ui/forms/FormPageLayout.tsx index 4fef0c1..0156baf 100644 --- a/src/components/ui/forms/FormPageLayout.tsx +++ b/src/components/ui/forms/FormPageLayout.tsx @@ -19,9 +19,9 @@ const FormPageLayout: FC = ({ backLinkText, }) => { return ( -
    -
    -
    +
    +
    +
    @@ -30,7 +30,7 @@ const FormPageLayout: FC = ({ {headingIcon({ className: 'text-4xl' })}{' '}

    {headingText}

    -
    {FormComponent}
    +
    {FormComponent}
    ); diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index aa90eb6..4eb64ed 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -21,6 +21,7 @@ export default function App({ Component, pageProps }: AppProps) { } `} + diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index e1e9cbb..f5bcab6 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -3,7 +3,26 @@ import { Html, Head, Main, NextScript } from 'next/document'; export default function Document() { return ( - + + + + + +
    diff --git a/src/pages/beers/[id]/index.tsx b/src/pages/beers/[id]/index.tsx index 6fca763..33f0462 100644 --- a/src/pages/beers/[id]/index.tsx +++ b/src/pages/beers/[id]/index.tsx @@ -47,17 +47,21 @@ const BeerByIdPage: NextPage = ({ beerPost, beerRecommendations } infiniteLoop showThumbs={false} > - {beerPost.beerImages.map((image, index) => ( -
    - {image.alt} -
    - ))} + {beerPost.beerImages.length + ? beerPost.beerImages.map((image, index) => ( +
    + {image.alt} +
    + )) + : Array.from({ length: 1 }).map((_, i) => ( +
    + ))}
    diff --git a/src/pages/beers/index.tsx b/src/pages/beers/index.tsx index f02693e..957fb04 100644 --- a/src/pages/beers/index.tsx +++ b/src/pages/beers/index.tsx @@ -11,7 +11,7 @@ import Spinner from '@/components/ui/Spinner'; import useBeerPosts from '@/hooks/useBeerPosts'; import BeerPostLoadingCard from '@/components/BeerIndex/BeerPostLoadingCard'; -import { FaArrowUp } from 'react-icons/fa'; +import { FaArrowUp, FaPlus } from 'react-icons/fa'; const BeerPage: NextPage = () => { const { user } = useContext(UserContext); @@ -39,14 +39,15 @@ const BeerPage: NextPage = () => {
    -
    -
    -

    The Biergarten Index

    -
    +
    +

    The Biergarten Index

    {!!user && ( -
    - - Create a new beer post +
    + +
    )} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 3d42234..cafe591 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -16,7 +16,7 @@ const Home: NextPage = () => { The Biergarten App

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