From 1bc01ac3c574f4cb671bd64af64170bd36b610b4 Mon Sep 17 00:00:00 2001 From: Nazire Date: Wed, 15 May 2024 21:39:41 +0300 Subject: [PATCH] Added Profile Component --- frontend/src/components/Bookmarkers.tsx | 0 frontend/src/components/NavbarLayout.tsx | 4 ++-- frontend/src/components/Profile.tsx | 25 ++++++++++++++++++++++++ frontend/src/components/Recipe.tsx | 6 ++++-- 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 frontend/src/components/Bookmarkers.tsx create mode 100644 frontend/src/components/Profile.tsx diff --git a/frontend/src/components/Bookmarkers.tsx b/frontend/src/components/Bookmarkers.tsx new file mode 100644 index 00000000..e69de29b diff --git a/frontend/src/components/NavbarLayout.tsx b/frontend/src/components/NavbarLayout.tsx index 2bfcc243..d716854f 100644 --- a/frontend/src/components/NavbarLayout.tsx +++ b/frontend/src/components/NavbarLayout.tsx @@ -27,7 +27,7 @@ import { Sheet, SheetContent, SheetTrigger } from "./ui/sheet"; import { SearchBar } from "./SearchBar"; import useAuthStore from "../services/auth"; import { FullscreenLoading } from "./FullscreenLoading"; -import { useNavigate } from "react-router-dom"; +import Bookmark from "@/assets/Icon/General/Bookmark.svg?react"; const links = [{ name: "Home", path: "/" }] as const; @@ -127,7 +127,7 @@ export const NavbarLayout = () => { - + Bookmarks diff --git a/frontend/src/components/Profile.tsx b/frontend/src/components/Profile.tsx new file mode 100644 index 00000000..972f1de0 --- /dev/null +++ b/frontend/src/components/Profile.tsx @@ -0,0 +1,25 @@ +import { Button } from "@/components/ui/button"; +import { UserSummary } from "@/services/api/semanticBrowseSchemas"; +import { Link } from "react-router-dom"; + +interface ProfileProps { + profile: UserSummary; +} + +export const Profile = ({ profile }: ProfileProps) => { + return ( +
+ + Author + + {profile.username} + + + +
+ ); +}; diff --git a/frontend/src/components/Recipe.tsx b/frontend/src/components/Recipe.tsx index 51cb2549..df786beb 100644 --- a/frontend/src/components/Recipe.tsx +++ b/frontend/src/components/Recipe.tsx @@ -2,7 +2,7 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { AspectRatio } from "@/components/ui/aspect-ratio"; import LinkIcon from "@/assets/Icon/General/Link.svg"; -import BookmarkIcon from "@/assets/Icon/General/Bookmark.svg"; +import Bookmark from "@/assets/Icon/General/Bookmark.svg?react"; import TimeIcon from "@/assets/Icon/General/Clock.svg"; import StarIcon from "@/assets/Icon/General/Star.svg"; import FoodIcon from "@/assets/Icon/General/Food.svg"; @@ -43,7 +43,9 @@ export const Recipe = ({ size="icon" variant="secondary" > - Bookmark icon +
+ +