From 4d96dd5c83ffbaa5393eafa019ac87078a11ebe7 Mon Sep 17 00:00:00 2001 From: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Date: Wed, 25 Oct 2023 23:22:46 -0400 Subject: [PATCH] Roll out 1.4.1 (#177) * Feature/config email testing on local environment (#138) * Remove (#92) Co-authored-by: Pjaijai * [#137] Config email testing on local environment * Fix .env variable name --------- Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai * Feature/revamp card (#135) * Feature/update backend setup on developer md (#104) * Ignore local IDE config * Update backend setup guidelines on developer.md * Add supabase config guidelines * Fix md syntax * add CORS to edge func depending on the staging env * add reply-to header to both contact email (#109) * Feature/refactor search hook (#96) * Refactor search hook in referral page * Refactor referee search hook * Remove useless import * Refactor referee post * Refactor referrer post search hook * Remmove uesless import * Change to error toast (#106) Co-authored-by: Pjaijai --------- Co-authored-by: Pjaijai * create new card component for referrer and referee; update card skeleton; add missing modules in tailwind * add referral post card; update referral post pages * update contact toUuid; minor ui fix * add items-center to info display * Show edit button on profile page if logged-in user is profile user * Fix build error * Fix typos * Import as module path * Module import * Using Link instead of onurlclick * Fix import * Remove id slug user page * Remove showEditButton props --------- Co-authored-by: Lulu <76647602+511234@users.noreply.github.com> Co-authored-by: Thomas Yau Co-authored-by: Thomas Yau Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai Co-authored-by: Lulu Tung * Refactor/fix all formart problem (#142) * Fix doc * Fix format --------- Co-authored-by: Pjaijai * Refactor/fixing site config and using common layout (#172) * Rename search page layout to common page layout * refactor common layout * Using common layout * Remove margin top in create post template --------- Co-authored-by: Pjaijai * version bump (#175) Co-authored-by: Pjaijai * Feature/contributors page (#174) * fix file name --------- Co-authored-by: Lulu <76647602+511234@users.noreply.github.com> Co-authored-by: Pjaijai Co-authored-by: marukosy124 <54564324+marukosy124@users.noreply.github.com> Co-authored-by: Thomas Yau Co-authored-by: Thomas Yau Co-authored-by: Lulu Tung --- DEVELOPER.md | 19 +++-- client/app/auth/page.tsx | 7 +- client/app/contributors/page.tsx | 15 ++++ client/app/page.tsx | 4 +- client/app/post/create/page.tsx | 9 +- client/app/post/referee/page.tsx | 7 +- client/app/post/referer/page.tsx | 7 +- client/app/profile/[userUuid]/page.tsx | 5 +- client/app/referee/page.tsx | 7 +- client/app/referer/page.tsx | 7 +- .../components/customized-ui/footer/nav.tsx | 75 +++++++++++------ client/components/icons.tsx | 4 + client/components/layouts/common.tsx | 18 ++++ client/components/layouts/search-page.tsx | 17 ---- client/config/site.ts | 16 ++-- .../components/contribution-area-badge.tsx | 17 ++++ .../components/contributor-card.tsx | 53 ++++++++++++ .../modules/contributors/data/contributors.ts | 82 +++++++++++++++++++ client/modules/contributors/template.tsx | 21 +++++ .../contributors/types/contributed-area.ts | 6 ++ .../modules/contributors/types/contributor.ts | 12 +++ .../uilts/get-contribution-area-text.ts | 17 ++++ client/modules/post/create/template.tsx | 2 +- client/package.json | 2 +- 24 files changed, 349 insertions(+), 80 deletions(-) create mode 100644 client/app/contributors/page.tsx create mode 100644 client/components/layouts/common.tsx delete mode 100644 client/components/layouts/search-page.tsx create mode 100644 client/modules/contributors/components/contribution-area-badge.tsx create mode 100644 client/modules/contributors/components/contributor-card.tsx create mode 100644 client/modules/contributors/data/contributors.ts create mode 100644 client/modules/contributors/template.tsx create mode 100644 client/modules/contributors/types/contributed-area.ts create mode 100644 client/modules/contributors/types/contributor.ts create mode 100644 client/modules/contributors/uilts/get-contribution-area-text.ts diff --git a/DEVELOPER.md b/DEVELOPER.md index 3ec6655a..d6e77ef4 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -90,6 +90,7 @@ For accurate information, please check supabase local dev doc here[https://supab 6. Every time you make changes to Supabase functions, run `supabase functions deploy --project-ref [your-supabase-project-id]`. ## Frontend Development + - Environment - NodeJS 18.0.0 - 20.5.1 - NPM 9.0.0 - 10.0.0 @@ -97,17 +98,17 @@ For accurate information, please check supabase local dev doc here[https://supab ### To start a local development server 1. Navigate to the 'client' directory\ - ```bash - cd client - ``` + ```bash + cd client + ``` 1. Install dependencies\ - ```bash - npm install - ``` + ```bash + npm install + ``` 1. Start the development server - ```bash - npm run preview - ``` + ```bash + npm run preview + ``` 1. View the website at [http://localhost:3000](http://localhost:3000) ### Creating branch diff --git a/client/app/auth/page.tsx b/client/app/auth/page.tsx index 42bf614c..d049b85c 100644 --- a/client/app/auth/page.tsx +++ b/client/app/auth/page.tsx @@ -3,11 +3,14 @@ import React from "react" import AuthPageTemplate from "@/modules/auth/template" +import { siteConfig } from "@/config/site" +import CommonPageLayout from "@/components/layouts/common" + const AuthPage = () => { return ( -
+ -
+ ) } diff --git a/client/app/contributors/page.tsx b/client/app/contributors/page.tsx new file mode 100644 index 00000000..650ac63c --- /dev/null +++ b/client/app/contributors/page.tsx @@ -0,0 +1,15 @@ +import React from "react" +import ContributorsPageTemplate from "@/modules/contributors/template" + +import { siteConfig } from "@/config/site" +import CommonPageLayout from "@/components/layouts/common" + +const ContributorsPage = () => { + return ( + + + + ) +} + +export default ContributorsPage diff --git a/client/app/page.tsx b/client/app/page.tsx index 8c41770a..223793a3 100644 --- a/client/app/page.tsx +++ b/client/app/page.tsx @@ -28,12 +28,12 @@ export default function IndexPage() {
- 了解更多 + {siteConfig.page.contributors.name} { - return + return ( + + + + ) } export default CreatePostPage diff --git a/client/app/post/referee/page.tsx b/client/app/post/referee/page.tsx index 407bc6f3..e480303a 100644 --- a/client/app/post/referee/page.tsx +++ b/client/app/post/referee/page.tsx @@ -1,13 +1,14 @@ import React from "react" import RefereePostPageTemplate from "@/modules/post/referee/template" -import SearchPageLayout from "@/components/layouts/search-page" +import { siteConfig } from "@/config/site" +import CommonPageLayout from "@/components/layouts/common" const RefereePostPage = () => { return ( - + - + ) } diff --git a/client/app/post/referer/page.tsx b/client/app/post/referer/page.tsx index e3a3539e..dd244e1a 100644 --- a/client/app/post/referer/page.tsx +++ b/client/app/post/referer/page.tsx @@ -1,13 +1,14 @@ import React from "react" import RefererPostPageTemplate from "@/modules/post/referer/template" -import SearchPageLayout from "@/components/layouts/search-page" +import { siteConfig } from "@/config/site" +import CommonPageLayout from "@/components/layouts/common" const RefererPostPage = () => { return ( - + - + ) } diff --git a/client/app/profile/[userUuid]/page.tsx b/client/app/profile/[userUuid]/page.tsx index 2fa0fb35..325351f4 100644 --- a/client/app/profile/[userUuid]/page.tsx +++ b/client/app/profile/[userUuid]/page.tsx @@ -9,6 +9,7 @@ import { siteConfig } from "@/config/site" import useGetUserprofile from "@/hooks/api/user/get-user-profile" import useUserStore from "@/hooks/state/user/store" import { Icons } from "@/components/icons" +import CommonPageLayout from "@/components/layouts/common" const Page = ({ params }: { params: { userUuid: string } }) => { const { userUuid } = params @@ -39,7 +40,7 @@ const Page = ({ params }: { params: { userUuid: string } }) => { ) if (!isLoading && profile) return ( -
+ {!isEditMode && ( { setIsEditMode={setIsEditMode} /> )} -
+ ) } diff --git a/client/app/referee/page.tsx b/client/app/referee/page.tsx index a95881d9..3c0b4d75 100644 --- a/client/app/referee/page.tsx +++ b/client/app/referee/page.tsx @@ -4,13 +4,14 @@ import React from "react" import { NextPage } from "next" import RefereePageTemplate from "@/modules/referral/referee/template" -import SearchPageLayout from "@/components/layouts/search-page" +import { siteConfig } from "@/config/site" +import CommonPageLayout from "@/components/layouts/common" const RefereePage: NextPage = () => { return ( - + - + ) } diff --git a/client/app/referer/page.tsx b/client/app/referer/page.tsx index 675a0ff4..2d18a008 100644 --- a/client/app/referer/page.tsx +++ b/client/app/referer/page.tsx @@ -4,13 +4,14 @@ import React from "react" import { NextPage } from "next" import RefererPageTemplate from "@/modules/referral/referer/template" -import SearchPageLayout from "@/components/layouts/search-page" +import { siteConfig } from "@/config/site" +import CommonPageLayout from "@/components/layouts/common" const RefererPage: NextPage = () => { return ( - + - + ) } diff --git a/client/components/customized-ui/footer/nav.tsx b/client/components/customized-ui/footer/nav.tsx index b91cd3f5..14eef645 100644 --- a/client/components/customized-ui/footer/nav.tsx +++ b/client/components/customized-ui/footer/nav.tsx @@ -1,3 +1,5 @@ +"use client" + import React from "react" import Link from "next/link" @@ -6,33 +8,52 @@ import { Icons } from "@/components/icons" const NavFooter = () => { return ( -