Skip to content

Commit

Permalink
Added Profile Component
Browse files Browse the repository at this point in the history
  • Loading branch information
NazireAta committed May 15, 2024
1 parent 466a636 commit 1bc01ac
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
Empty file.
4 changes: 2 additions & 2 deletions frontend/src/components/NavbarLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -127,7 +127,7 @@ export const NavbarLayout = () => {
<DropdownMenuSeparator />
<DropdownMenuItem asChild>
<Link to="/bookmarks">
<User className="mr-2 h-4 w-4" />
<Bookmark className="mr-2 h-4 w-4 fill-white" />
<span>Bookmarks</span>
</Link>
</DropdownMenuItem>
Expand Down
25 changes: 25 additions & 0 deletions frontend/src/components/Profile.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="flex justify-between items-center">
<Link to={`/users/${profile.id}`} className="flex items-center gap-5">
<img
src={profile.profilePicture}
alt="Author"
className="mr-2 h-10 w-10 rounded-full"
/>
<span className="text-lg font-medium text-gray-900">
{profile.username}
</span>
</Link>
<Button> Follow </Button>
</div>
);
};
6 changes: 4 additions & 2 deletions frontend/src/components/Recipe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -43,7 +43,9 @@ export const Recipe = ({
size="icon"
variant="secondary"
>
<img src={BookmarkIcon} alt="Bookmark icon" />
<div className="flex items-center gap-4">
<Bookmark className="h-4 w-4 fill-white" />
</div>
</Button>
</div>
</div>
Expand Down

0 comments on commit 1bc01ac

Please sign in to comment.