From 548017228a0d145d4d06163f9f33c538c4386e98 Mon Sep 17 00:00:00 2001 From: Joonho Jonathan Oh <149014867+joonhoswe@users.noreply.github.com> Date: Sun, 15 Sep 2024 08:33:18 -0400 Subject: [PATCH 1/2] updates across page --- backend/db.sqlite3 | Bin 139264 -> 139264 bytes src/pages/browse.jsx | 2 +- src/pages/postListing.jsx | 6 +++--- src/pages/profile.jsx | 10 ++++++++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/backend/db.sqlite3 b/backend/db.sqlite3 index cee2f3f85da7e8b8a427cd7c0a7c4f01add39724..f7ff02318262887a34183b4b60e31ce0fac8c431 100644 GIT binary patch delta 565 zcmYL`%}&BV5Xaq3NJ`5`2*Jc4?E+CQYAePA@ua9BLD2+FJ(y@|S1DgL?E>P#(0Dg` z>I?7!#ze0idP@t zv(i$$7W;}NqW#D$B5}{`jFmpKXqnC1`FLb0wONn_V5gX5t7R1TJN>TS>vz%B2|C19 z+u7t{k=1B~+(UEDVsPg`nZLSmb6c&4`iQE#+r=C@RR}S$ zWqFGTcjwCA!$u$j*eXY1*@Bz}cEVqQ+|&tf7}Tx@;D!tBBX<826oS1)uCSCsep2{Q2e@onQ1vpy$(a%n+cett?$YH>z>s&h_$Nk(Q~dT3r|S!z*nW=W+&ewu=F zVoqjSeo=dIfpuI$*u^g!LNgnV6vI4Q60qa$t~`RR;Q?F_u#p z?t|p~+=9}Q)FRiM)Z~(){JhNMV*DNv1No#fwOFoEiIayxR9-#Ynz50UbGp17(-KC` P=||+4rUR)Md8Q=*{sd`B diff --git a/src/pages/browse.jsx b/src/pages/browse.jsx index a9497e7..35ad6ad 100644 --- a/src/pages/browse.jsx +++ b/src/pages/browse.jsx @@ -163,7 +163,7 @@ export default function Browse() { p={0} noOfLines={1} > - {school}'s Items + Goods @ {school}:
diff --git a/src/pages/postListing.jsx b/src/pages/postListing.jsx index 77cbaf6..514a6eb 100644 --- a/src/pages/postListing.jsx +++ b/src/pages/postListing.jsx @@ -326,9 +326,9 @@ export default function PostListing() { id="itemCategory" value={itemCategory} onChange={(e) => setItemCategory(e.target.value)} - // className={`p-2 border rounded-lg ${ - // !isEmailValid ? "cursor-not-allowed" : "cursor-text" - // }`} + className={`p-2 border rounded-lg ${ + !isEmailValid ? "cursor-not-allowed" : "cursor-text" + }`} disabled={!isEmailValid} // Disable input if the email is not valid > diff --git a/src/pages/profile.jsx b/src/pages/profile.jsx index e4269c0..ae66948 100644 --- a/src/pages/profile.jsx +++ b/src/pages/profile.jsx @@ -5,10 +5,20 @@ import { Heading, Divider, Button } from "@chakra-ui/react"; import axios from "axios"; import ItemCard from "../components/ItemCard"; import { useNavigate } from "react-router-dom"; +import BrowseItemDisplay from "../components/BrowseItemDisplay"; +import { useLocation } from "react-router-dom"; import OpenAI from "openai"; export default function Profile() { const { isSignedIn, user, isLoaded } = useUser(); + + const location = useLocation(); + const { school } = location.state || {}; + + const isEmailValid = user + ? user.primaryEmailAddress.emailAddress.endsWith(".edu") + : false; + const navigate = useNavigate(); const openai = new OpenAI({ apiKey: import.meta.env.VITE_OPENAI_API_KEY, From f34aeaf12c8368566f5ae40ffa5223ae174ffff1 Mon Sep 17 00:00:00 2001 From: Joonho Jonathan Oh <149014867+joonhoswe@users.noreply.github.com> Date: Sun, 15 Sep 2024 08:36:47 -0400 Subject: [PATCH 2/2] purging db --- backend/db.sqlite3 | Bin 139264 -> 139264 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/backend/db.sqlite3 b/backend/db.sqlite3 index f7ff02318262887a34183b4b60e31ce0fac8c431..437920e788553f2a2e75809c1b018b39fe3507e4 100644 GIT binary patch delta 120 zcmZoTz|nAkV}dke$V3@u#*oH@)&$0_2~11)#TWz_7`P13;buhzF|O$bQcTNO7#LW! zw%?Ls3S$H^nJ-K?kzrZ{WHHR&eoKbQ93;s2e!8d}(?Sr-Yx*uZrYRulP1A$qnbrXS Dn-Cj% delta 120 zcmZoTz|nAkV}dlJ_e2?IM(@Ui)&$0_2~11)#W=YP82J78w($w_mhxQVG2pJ_y2fR& zSy4fZYr26H(=wJuRX(2Wx1^ZD7+D&Xd3dIq$S^HpX_Vmx3d%5<0|k{hd8UiXF)d_i X6y@NVzDtg23QMCtJJ0kWd8Ty$n7JO?