Skip to content

Commit

Permalink
Fix Minsweeper Page, Add more links to card, Begin Settings Page
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtyson123 committed Jul 22, 2024
1 parent 43c4b0c commit bb12db7
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 7 deletions.
6 changes: 4 additions & 2 deletions website/src/components/plant_card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ export default function PlantCardData({ data}: PlantCardProps){

{/* Image of the plant, grabbed from the image attachments of the pant data*/}
<div className={styles.imageContainer}>
<CreditedImage url={mainImage} alt={mainImageAlt} credits={mainImageCredits} colour={"white"}/>
<Link href={"/plants/" + data.id}>
<CreditedImage url={mainImage} alt={mainImageAlt} credits={mainImageCredits} colour={"white"}/>
</Link>
</div>

{/* Title, category, description*/}
<h1 className={styles.title}>{names[0]}</h1>
<Link href={"/plants/" + data.id} className={styles.title}>{names[0]}</Link>
<h3 className={styles.category}>{names[1]} | {names[2]}</h3>
<p className={styles.description}>{data.small_description}</p>

Expand Down
6 changes: 4 additions & 2 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {



Expand Down
62 changes: 62 additions & 0 deletions website/src/pages/media/profile/settings.tsx
Original file line number Diff line number Diff line change
@@ -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(
<Wrapper>
<div className={styles.page}>


{/* Top Bar */}
<div className={styles.topBar}>
<button onClick={() => {
router.push("/media/profile")
}} className={styles.backButton}>
<img src={"/media/images/back.svg"} alt={"back"}/>
</button>

<h1>Settings</h1>

</div>


{/* Settings */}
<div className={styles.notifications}>
<p> Last Login: {userLastLogin} </p>
<button onClick={openProfileChanger}>Profile Picture</button>
<h1>User Name</h1>
<h1>Log Out</h1>
<h1>Delete Account</h1>

</div>

</div>
</Wrapper>
)
}
4 changes: 2 additions & 2 deletions website/src/pages/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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())){


Expand All @@ -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],
Expand Down

0 comments on commit bb12db7

Please sign in to comment.