diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 4f6e54d..dca0c7e 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -18,8 +18,3 @@ jobs: - name: Install dependencies run: | npm ci - - - name: Prettier Action - # You may pin to the exact commit or the version. - # uses: creyD/prettier_action@6602189cf8bac1ce73ffe601925f6127ab7f21ac - uses: creyD/prettier_action@v4.2 diff --git a/components/Login/LoginForm.tsx b/components/Login/LoginForm.tsx index ca9ec9d..62dcbeb 100644 --- a/components/Login/LoginForm.tsx +++ b/components/Login/LoginForm.tsx @@ -29,9 +29,8 @@ const LoginForm = () => { const onSubmit: SubmitHandler = async (data) => { try { - const response = await sendLoginUserRequest(data); - - router.push(`/users/${response.id}`); + await sendLoginUserRequest(data); + router.push(`/user/current`); } catch (error) { if (error instanceof Error) { setResponseError(error.message); @@ -74,7 +73,7 @@ const LoginForm = () => { {responseError && }
-
diff --git a/components/ui/Spinner.tsx b/components/ui/Spinner.tsx index a3fb412..5baaec3 100644 --- a/components/ui/Spinner.tsx +++ b/components/ui/Spinner.tsx @@ -1,7 +1,7 @@ import { FC } from 'react'; interface SpinnerProps { - size?: 'xs' | 'sm' | 'md' | 'lg'; + size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; } const Spinner: FC = ({ size = 'md' }) => { @@ -10,13 +10,14 @@ const Spinner: FC = ({ size = 'md' }) => { sm: 'w-[20px]', md: 'w-[100px]', lg: 'w-[150px]', + xl: 'w-[200px]', }; return (
-

Hello!

- <> - {isLoading && } - {error &&

Something went wrong.

} - {user && ( -
-

{user.username}

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

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

+

Welcome to the Biergarten App!

+ + )}
);