From bb12db7249ee0741cf180343a0230ff9712ed60b Mon Sep 17 00:00:00 2001 From: "max.tyson" Date: Mon, 22 Jul 2024 15:05:09 +1200 Subject: [PATCH] Fix Minsweeper Page, Add more links to card, Begin Settings Page --- website/src/components/plant_card.tsx | 6 +- website/src/pages/index.tsx | 6 +- .../media/{profile.tsx => profile/index.tsx} | 2 +- website/src/pages/media/profile/settings.tsx | 62 +++++++++++++++++++ website/src/pages/search.tsx | 4 +- 5 files changed, 73 insertions(+), 7 deletions(-) rename website/src/pages/media/{profile.tsx => profile/index.tsx} (99%) create mode 100644 website/src/pages/media/profile/settings.tsx diff --git a/website/src/components/plant_card.tsx b/website/src/components/plant_card.tsx index 94b697f..fae72d3 100644 --- a/website/src/components/plant_card.tsx +++ b/website/src/components/plant_card.tsx @@ -98,11 +98,13 @@ export default function PlantCardData({ data}: PlantCardProps){ {/* Image of the plant, grabbed from the image attachments of the pant data*/}
- + + +
{/* Title, category, description*/} -

{names[0]}

+ {names[0]}

{names[1]} | {names[2]}

{data.small_description}

diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index e7ab655..3d2bfcc 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -22,9 +22,10 @@ import axios from "axios"; // TODO: // - Plant App +// - - Settings Page +// - - Plant Info Page In App // - - Moderation // - - Live Chat -// - - Settings Page // - - Publish on stores // - - Link To Rongoa (Images Popup and Home Feed) // - Plant Updates @@ -41,7 +42,8 @@ import axios from "axios"; // - - Auto Generate Doxy Gen // - - API Docs // - General QOL -// - - Data Fetch Rewrite +// - - S.E.O +// - - Data Fetch Rewrite (STATIC PROPS) // - - About Section Rewrite // - - Calender Overhaul // - - Admin Overhaul diff --git a/website/src/pages/media/profile.tsx b/website/src/pages/media/profile/index.tsx similarity index 99% rename from website/src/pages/media/profile.tsx rename to website/src/pages/media/profile/index.tsx index c8fc39b..a25db35 100644 --- a/website/src/pages/media/profile.tsx +++ b/website/src/pages/media/profile/index.tsx @@ -9,7 +9,7 @@ import {addMeasureSuffix, getFilePath} from "@/lib/data"; import Image from "next/image"; import Link from "next/link"; import {loader_data} from "@/lib/loader_data"; -export default function Profile() { +export default function Index() { diff --git a/website/src/pages/media/profile/settings.tsx b/website/src/pages/media/profile/settings.tsx new file mode 100644 index 0000000..105b37b --- /dev/null +++ b/website/src/pages/media/profile/settings.tsx @@ -0,0 +1,62 @@ +import Wrapper from "@/pages/media/components/wrapper"; +import styles from "@/styles/media/notifications.module.css"; +import React, {useEffect, useRef, useState} from "react"; +import { Knock } from "@knocklabs/node"; +import {makeRequestWithToken} from "@/lib/api_tools"; +import { useSession } from "next-auth/react"; +import {RongoaUser} from "@/lib/users"; +import {NOTIFICATIONS} from "@/lib/constants"; +import {useRouter} from "next/router"; + + +export default function Page(){ + + const {data: session} = useSession(); + + const dataFetch = useRef(false); + + useEffect(() => { + + + }, [session]); + + + + const router = useRouter(); + + const openProfileChanger = () =>{ + + } + + return( + +
+ + + {/* Top Bar */} +
+ + +

Settings

+ +
+ + + {/* Settings */} +
+

Last Login: {userLastLogin}

+ +

User Name

+

Log Out

+

Delete Account

+ +
+ +
+
+ ) +} \ No newline at end of file diff --git a/website/src/pages/search.tsx b/website/src/pages/search.tsx index 0fe218a..42753b5 100644 --- a/website/src/pages/search.tsx +++ b/website/src/pages/search.tsx @@ -93,7 +93,7 @@ export default function Search(){ const startTime = Date.now() let apiResults: JSX.Element[] = [] - const seedSweeperVariants = ["seedsweeper", "seed-sweeper", "seed_sweeper", "seed sweeper", "mine sweeper", "minesweeper", "mine-sweeper", "mine sweeper", "sweeper", "seed"] + const seedSweeperVariants = ["seedsweeper", "sweed", "seed-sweeper", "seed_sweeper", "seed sweeper", "mine sweeper", "minesweeper", "mine-sweeper", "mine sweeper", "sweeper", "seed"] if (seedSweeperVariants.includes(name.toLowerCase())){ @@ -106,7 +106,7 @@ export default function Search(){ preferred_name: "English", english_name: "Seed Sweeper", latin_name: "Max Tyson", - maori_name: "Easter Egg", + maori_name: "Easter Egg-plant", small_description: "A fun game made by Max Tyson", display_image: "main", authorIDs: [2],