Skip to content

Commit

Permalink
Develop (#33)
Browse files Browse the repository at this point in the history
* Atualizando default value

* Atualizando testes

* Fix urls
  • Loading branch information
matheusgrodrigues authored Apr 16, 2024
1 parent 43e0eca commit f90b309
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Algumas validações importantes do sistema:
### Deploy e Hospedagem

- Vercel
- Heroku
- Render

### Documentacao

Expand Down
6 changes: 2 additions & 4 deletions src/app/unauthorized/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import React, { useCallback } from 'react';
import React from 'react';
import { useRouter } from 'next/navigation';

import { Button, Text, Title } from '@/components/atoms';
Expand All @@ -13,8 +13,6 @@ const PageUnauthorized = () => {

const { t } = useTranslation();

const handleLogin = useCallback(() => router.push('/'), []);

return (
<main data-testid="p-401" className="page-unauthorized">
<Header />
Expand All @@ -26,7 +24,7 @@ const PageUnauthorized = () => {

<Text variant="fwReg-fs20-lh30-gray500">{t('specific.unauthorized.label.description')}</Text>

<Button variant="gradient" onClick={handleLogin}>
<Button variant="gradient" onClick={() => router.push('/')}>
{t('specific.unauthorized.label.facaLogin')}
</Button>
</main>
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/SessionHOC/sessionHOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const withSessionHOC = <P extends object>(Component: ComponentType<P & Se
if (window.location.pathname === '/') {
router.push('/');
} else {
router.push('/401');
router.push('/unauthorized');
}
} else if (!loading && !error && data.session && window.location.pathname === '/') {
router.push('/welcome');
Expand Down

0 comments on commit f90b309

Please sign in to comment.