From 8e5077c32cadf75961f50071c78aa4559cec0e3a Mon Sep 17 00:00:00 2001 From: yuqi88 Date: Mon, 9 May 2022 04:18:30 -0700 Subject: [PATCH 1/6] add birth-year to schema --- prisma/schema.prisma | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 23328ae..ae519a9 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,10 +1,11 @@ + datasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { - provider = "prisma-client-js" + provider = "prisma-client-js" previewFeatures = ["referentialIntegrity"] } @@ -48,6 +49,7 @@ model User { id Int @id @default(autoincrement()) email String? @unique password String? + birthYear String? name String? @unique emailVerified DateTime? @map(name: "emailVerified") image String? From 88d7723b78dc2fe858f7edf950daca8fda26c4a6 Mon Sep 17 00:00:00 2001 From: yuqi88 Date: Mon, 9 May 2022 04:20:33 -0700 Subject: [PATCH 2/6] fix bug: Header import location --- src/pages/admin/index.tsx | 2 +- src/pages/auth/profile/index.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/admin/index.tsx b/src/pages/admin/index.tsx index a1a7c8b..e6c4d13 100644 --- a/src/pages/admin/index.tsx +++ b/src/pages/admin/index.tsx @@ -9,7 +9,7 @@ import { } from '../../components/App'; import { getAllPuzzles, isAdmin } from '../../services'; import { GetServerSideProps } from 'next'; -import { Header } from '../../components/Global'; +import { Header } from '../../components/Product'; import type { PuzzleCustom } from '../../types/api/puzzles/puzzle'; const Admin = ({ puzzlesList }: { puzzlesList: PuzzleCustom[] }) => { diff --git a/src/pages/auth/profile/index.tsx b/src/pages/auth/profile/index.tsx index 32a896e..1895866 100644 --- a/src/pages/auth/profile/index.tsx +++ b/src/pages/auth/profile/index.tsx @@ -9,7 +9,8 @@ import { getUserByEmail, updateUsername } from '../../../services'; -import { Header, Input, Button } from '../../../components/Global'; +import { Input, Button } from '../../../components/Global'; +import { Header } from '../../../components/Product'; import styles from '../../../styles/pages/profile.module.scss'; const ProfilePage = () => { @@ -143,7 +144,7 @@ const ProfilePage = () => { Birth year: {/* TODO: Load birthyear */} Date: Mon, 9 May 2022 04:22:03 -0700 Subject: [PATCH 3/6] change wording --- src/components/Global/LogStatusButton/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Global/LogStatusButton/index.tsx b/src/components/Global/LogStatusButton/index.tsx index a7577aa..32fc90f 100644 --- a/src/components/Global/LogStatusButton/index.tsx +++ b/src/components/Global/LogStatusButton/index.tsx @@ -9,7 +9,7 @@ const LogStatusButton = ({ status, useLogIn }: LogStatusButtonProps) => { ) : useLogIn ? ( - + {NavContent(true)}