Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media and Profile Header links #50

Merged
merged 2 commits into from
Dec 12, 2024
Merged
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
53 changes: 34 additions & 19 deletions src/components/SideNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,33 @@ const SideNavBar = ({ user }: SideNavBarProps) => {

const tabs = user.role === Role.ADMIN ? adminTabs : volunteerTabs;

const mediaTabs = [
{
name: "Facebook",
icon: "gg:facebook",
link: "https://www.facebook.com/breadandroseslawrence/",
},
{
name: "Instagram",
icon: "ph:instagram-logo",
link: "https://www.instagram.com/breadandroseslawrence/",
},
{
name: "Twitter",
icon: "fa6-brands:x-twitter",
link: "https://x.com/breadandroses58",
},
{
name: "Vimeo",
icon: "mdi:vimeo",
link: "https://vimeo.com/breadandroses",
},
{
name: "LinkedIn",
icon: "akar-icons:linkedin-fill",
link: "https://www.linkedin.com/company/breadandrosescommunitykitchen/",
},
];
return (
<div className="h-screen w-60 border-t border-r border-gray-200 fixed bg-white z-20 left-0">
<div className="flex place-content-center my-6 ">
Expand Down Expand Up @@ -90,25 +117,13 @@ const SideNavBar = ({ user }: SideNavBarProps) => {
<Divider items-center />
<div className="flex justify-center flex-col pl-1 gap-y-6 pt-4">
<div className="flex gap-5">
<button className="text-icon-color">
<Icon icon="gg:facebook" width="24" height="24" />
</button>

<button className="text-icon-color">
<Icon icon="ph:instagram-logo" width="24" height="24" />
</button>

<button className="text-icon-color">
<Icon icon="fa6-brands:x-twitter" width="24" height="24" />
</button>

<button className="text-icon-color">
<Icon icon="mdi:vimeo" width="24" height="24" />
</button>

<button className="text-icon-color">
<Icon icon="akar-icons:linkedin-fill" width="24" height="24" />
</button>
{mediaTabs.map((tab, index) => {
return (
<a href={tab.link} target="_blank" rel="noreferrer" key={index}>
<Icon icon={tab.icon} width="24" height="24" />
</a>
);
})}
</div>

<div className="flex text-gray-500">
Expand Down
17 changes: 10 additions & 7 deletions src/components/TopHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import React from "react";
import { VolunteerDetails } from "../types/next-auth";
import UserAvatar from "./UserAvatar";
import { usePathname } from "next/navigation";
import Link from "next/link";

interface TopHeaderProps {
user: {
Expand Down Expand Up @@ -68,13 +69,15 @@ const TopHeader = ({ user }: TopHeaderProps) => {
<h1 className={`${isEnglish ? "text-teal-600" : ""} font-medium mr-2`}>
EN
</h1>
<UserAvatar firstName={user.firstName} lastName={user.lastName} />
<div>
<h1 className="font-bold">
{user.firstName} {user.lastName}
</h1>
<h2 className="text-gray-500">{user.role.toLowerCase()}</h2>
</div>
<Link className="flex flex-row gap-3" href="/private/profile">
<UserAvatar firstName={user.firstName} lastName={user.lastName} />
<div>
<h1 className="font-bold">
{user.firstName} {user.lastName}
</h1>
<h2 className="text-gray-500">{user.role.toLowerCase()}</h2>
</div>
</Link>
</div>
</div>
);
Expand Down
Loading