From 323114aade7b46e0d9c5d993a5293b19d0e914ad Mon Sep 17 00:00:00 2001 From: Vitor Sousa Date: Mon, 12 Feb 2024 16:17:08 -0300 Subject: [PATCH 1/3] feat: changes landing page to home route --- src/app/config/routes.ts | 1 + src/view/pages/LandingPage/Hero.tsx | 4 +++- src/view/ui/Router/AuthGuard.tsx | 7 +++---- src/view/ui/Router/Router.tsx | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/app/config/routes.ts b/src/app/config/routes.ts index f1a740a..84a5f92 100644 --- a/src/app/config/routes.ts +++ b/src/app/config/routes.ts @@ -2,6 +2,7 @@ export const ROUTES = { LOGIN: '/login', REGISTER: '/register', HOME: '/', + DASHBOARD: '/app', PATIENTS: '/pacientes', PATIENTS_BY_ID: '/pacientes/:id', PLANNING_MEAL_BY_PATIENT: '/pacientes/:id/plano', diff --git a/src/view/pages/LandingPage/Hero.tsx b/src/view/pages/LandingPage/Hero.tsx index ebae7c0..2b38433 100644 --- a/src/view/pages/LandingPage/Hero.tsx +++ b/src/view/pages/LandingPage/Hero.tsx @@ -1,3 +1,5 @@ +import { ROUTES } from '@godiet-config'; + export function Hero() { return ( <> @@ -51,7 +53,7 @@ export function Hero() {
Comece agora ; + return ; } if (signedIn && !isPrivate) { - return ; + return ; } return ; diff --git a/src/view/ui/Router/Router.tsx b/src/view/ui/Router/Router.tsx index 14305d8..7c0dac8 100644 --- a/src/view/ui/Router/Router.tsx +++ b/src/view/ui/Router/Router.tsx @@ -4,7 +4,6 @@ import { Suspense } from 'react'; import { Logo } from '@godiet-components/Logo'; import { Spinner } from '@godiet-components/Spinner'; import { ROUTES } from '@godiet-config'; -import { LandingPage } from '@godiet-pages/LandingPage'; import { NotFound } from '@godiet-pages/NotFound'; import { lazyLoad } from '@godiet-utils/lazyLoad'; @@ -22,6 +21,7 @@ const { DashboardLayout } = lazyLoad( ); const { Login } = lazyLoad(() => import('@godiet-pages/Login')); +const { LandingPage } = lazyLoad(() => import('@godiet-pages/LandingPage')); const { Register } = lazyLoad(() => import('@godiet-pages/Register')); const { Settings } = lazyLoad(() => import('@godiet-pages/Settings')); const { SettingsLayout } = lazyLoad( @@ -56,11 +56,11 @@ export function Router() { }> } /> } /> - } /> + } /> }> }> - } /> + } /> }> } /> Date: Mon, 12 Feb 2024 16:21:30 -0300 Subject: [PATCH 2/3] chore: updated scripts --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2cdadd1..d174d66 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "preview": "vite preview", "prepare": "husky", "test": "vitest --coverage", - "test:ci": "vitest --no-watch", + "test:ci": "vitest --no-watch --passWithNoTests", "test:ui": "vitest --ui", "typecheck": "tsc --noEmit" }, From 5faceb9f3f218b6749ebe8c2ee832da11b929d5e Mon Sep 17 00:00:00 2001 From: Vitor Sousa Date: Tue, 13 Feb 2024 11:00:07 -0300 Subject: [PATCH 3/3] build: created file to generate build --- buildspec.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 buildspec.yml diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 0000000..68779f7 --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,20 @@ +version: 0.2 + +phases: + install: + runtime-versions: + nodejs: 18 + + pre_build: + commands: + - npm pkg delete scripts.prepare + - yarn install --lock-file + + build: + commands: + - yarn build + + post_build: + commands: + - aws s3 sync --delete ./dist s3://godiet-client-prod + - aws cloudfront create-invalidation --distribution-id EG9I86T3KBN17 --paths /index.html