diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 3f91712a..040e3452 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -32,6 +32,7 @@ import PrivacyPolicy from "@/components/pages/PrivacyPolicy"; import Profile from "@/components/pages/Profile"; import ResearchPage from "@/components/pages/ResearchPage"; import SellerDashboard from "@/components/pages/SellerDashboard"; +import SellerOnboarding from "@/components/pages/SellerOnboarding"; import Signup from "@/components/pages/Signup"; import Terminal from "@/components/pages/Terminal"; import TermsOfService from "@/components/pages/TermsOfService"; @@ -39,8 +40,6 @@ import { AlertQueue, AlertQueueProvider } from "@/hooks/useAlertQueue"; import { AuthenticationProvider } from "@/hooks/useAuth"; import ROUTES from "@/lib/types/routes"; -import SellerOnboarding from "./components/pages/SellerOnboarding"; - const App = () => { return ( @@ -97,44 +96,53 @@ const App = () => { element={} /> } /> + } + /> {/* Listings */} - } /> - } /> + + } + /> + } + /> + } /> - } - /> } /> {/* Seller */} - + } + > } /> } - /> - } /> {/* Orders */} - } - /> + + } + /> + } diff --git a/frontend/src/components/auth/SignupForm.tsx b/frontend/src/components/auth/SignupForm.tsx index 0dec1c41..d002d06b 100644 --- a/frontend/src/components/auth/SignupForm.tsx +++ b/frontend/src/components/auth/SignupForm.tsx @@ -57,7 +57,7 @@ const SignupForm: React.FC = ({ signupTokenId }) => { addErrorAlert(error); } else { addAlert("Registration successful! You can now log in.", "success"); - navigate("/login"); + navigate(ROUTES.LOGIN.path); // Sign user in automatically? } } catch (err) { diff --git a/frontend/src/components/listing/ListingDeleteButton.tsx b/frontend/src/components/listing/ListingDeleteButton.tsx index 43f1a0fd..8919c43a 100644 --- a/frontend/src/components/listing/ListingDeleteButton.tsx +++ b/frontend/src/components/listing/ListingDeleteButton.tsx @@ -6,6 +6,7 @@ import Modal from "@/components/ui/Modal"; import { Button } from "@/components/ui/button"; import { useAlertQueue } from "@/hooks/useAlertQueue"; import { useAuthentication } from "@/hooks/useAuth"; +import ROUTES from "@/lib/types/routes"; interface Props { listingId: string; @@ -37,7 +38,7 @@ const ListingDeleteButton = (props: Props) => { setDeleting(false); } else { addAlert("Listing was deleted successfully", "success"); - navigate("/browse"); + navigate(ROUTES.LISTINGS.BROWSE.path); } }; diff --git a/frontend/src/components/listing/ListingMetadata.tsx b/frontend/src/components/listing/ListingMetadata.tsx index a86858a6..45c6ffff 100644 --- a/frontend/src/components/listing/ListingMetadata.tsx +++ b/frontend/src/components/listing/ListingMetadata.tsx @@ -10,6 +10,7 @@ import { useNavigate } from "react-router-dom"; import { useAlertQueue } from "@/hooks/useAlertQueue"; import { useAuthentication } from "@/hooks/useAuth"; +import ROUTES from "@/lib/types/routes"; interface Props { listingId: string; @@ -110,7 +111,7 @@ const ListingMetadata = ({
diff --git a/frontend/src/components/pages/Profile.tsx b/frontend/src/components/pages/Profile.tsx index a4460c14..0720e951 100644 --- a/frontend/src/components/pages/Profile.tsx +++ b/frontend/src/components/pages/Profile.tsx @@ -1,6 +1,8 @@ import { useEffect, useState } from "react"; -import { useNavigate, useParams } from "react-router-dom"; +import { useNavigate } from "react-router-dom"; +import { useTypedParams } from "react-router-typesafe-routes/dom"; +import MyListingGrid from "@/components/listings/MyListingGrid"; import UpvotedGrid from "@/components/listings/UpvotedGrid"; import { Card, CardContent, CardHeader } from "@/components/ui/Card"; import { Input, TextArea } from "@/components/ui/Input/Input"; @@ -11,12 +13,11 @@ import { paths } from "@/gen/api"; import { useAlertQueue } from "@/hooks/useAlertQueue"; import { useAuthentication } from "@/hooks/useAuth"; import { useDebounce } from "@/hooks/useDebounce"; +import ROUTES from "@/lib/types/routes"; import { isValidUsername } from "@/lib/utils/validation"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@radix-ui/react-tabs"; import { format } from "date-fns"; -import MyListingGrid from "../listings/MyListingGrid"; - type UserResponse = paths["/users/public/{id}"]["get"]["responses"][200]["content"]["application/json"]; @@ -214,7 +215,10 @@ export const RenderProfile = (props: RenderProfileProps) => { {!isEditing && canEdit && (
-
- {!user.stripe_connect_account_id ? (