Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified backend/db.sqlite3
Binary file not shown.
2 changes: 1 addition & 1 deletion src/pages/browse.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default function Browse() {
p={0}
noOfLines={1}
>
{school}'s Items
Goods @ {school}:
</Heading>
<div className="flex flex-row justify-between">
<HStack spacing="8px">
Expand Down
6 changes: 3 additions & 3 deletions src/pages/postListing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
>
<option value="">Select a category</option>
Expand Down
10 changes: 10 additions & 0 deletions src/pages/profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down