Skip to content

Commit

Permalink
fix: some cleanups on useraccountnav.
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitdotdev committed Aug 30, 2024
1 parent ed33f8c commit ed34d78
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
21 changes: 2 additions & 19 deletions src/app/feed/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,6 @@ const page = async () => {

const session = await getAuthSession();

if (session?.user.role === "ADMIN") {
// redirect(authOptions?.pages?.signIn || "/");
// redirect("/");
}

// const communities = await db.community.findMany({
// take: 7,
// orderBy: {
// subscribers: {
// _count: "desc",
// },
// },
// })



// Get 5 new job postings based on the createdAt date and display them in the right aside component


const where: Prisma.JobWhereInput = {
Expand Down Expand Up @@ -153,14 +136,14 @@ const page = async () => {

return (
<div className=" pt-8 h-full w-full mx-auto ">
<div className="grid grid-cols-1 md:grid-cols-2 gap-y-4 py-6 space-y-8 space-x-24 w-full md:px-10 md:pl-20 ">
<div className="grid grid-cols-1 md:grid-cols-2 gap-y-4 py-6 space-x-24 w-full md:px-10 md:pl-20 ">

<div className="w-full ">
<HomeFeedTabs tabs={tabs} />
</div>


<div className=" top-16 md:top-24 justify-center md:right-32 mx-auto fixed w-1/3 ">
<div className=" top-16 justify-center md:right-32 mx-auto fixed w-1/3 ">
<ToolbarExpandable />

</div>
Expand Down
15 changes: 8 additions & 7 deletions src/components/UserAccountNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ const UserAccountNav: FC<UserAccountNavProps> = ({ user, username }) => {
</div>
</SheetTrigger>
<SheetContent className="w-[240px] md:w-[400px] bg-[#1B1F23] text-gray-400 border border-gray-600 rounded-l-2xl p-4 text-xs md:text-sm overflow-hidden data-[state=closed]:animate-out">
<div className="space-y-1">
<div className="space-y-[2.2px] md:space-y-1">
{/* User info section */}
<div className="flex items-center justify-start gap-2 p-2 text-gray-400 ">
{/* ... (user info content) ... */}
</div>
{/* <div className="flex items-center justify-start gap-2 p-2 text-gray-400 ">
</div> */}
{/* <Separator className="bg-gray-700" /> */}

{/* Navigation links */}
Expand All @@ -62,7 +62,7 @@ const UserAccountNav: FC<UserAccountNavProps> = ({ user, username }) => {
{ href: "/opportunities", icon: Compass, label: "Browse Opportunities" },
{ href: "/opportunities", icon: Briefcase, label: "Opportunities / OS Programs" },
{ href: "/articles/publish", icon: Library, label: "Free Resources and Tools" },
{ href: "/articles/categories/all", icon: Newspaper, label: "Articles" },
// { href: "/articles/categories/all", icon: Newspaper, label: "Articles" },
{ href: "/startups/catalog/essays", icon: TrendingUp, label: "Startup Archives" },
{ href: "/startups/catalog/workatstartups", icon: Briefcase, label: "Work At Startups" },
{ href: "/startups/catalog/jobstimeline", icon: Activity, label: "Jobs Timeline" },
Expand All @@ -79,14 +79,15 @@ const UserAccountNav: FC<UserAccountNavProps> = ({ user, username }) => {
<item.icon size={22} />
<span>{item.label}</span>
</Link>
{index === 1 || index === 4 || index === 6 || index === 11 ? (
{index === 1 || index === 4 || index === 6 || index === 10 ? (
<Separator className="bg-gray-700 my-4" />
) : null}
{index === 6 || index === 11 ? (
{index === 6 || index === 10 ? (
<SheetDescription className="text-xs my-2">
{index === 6 ? "Professional Connections and get Mentorship" : "Catalog and Archives to get you inspired"}
</SheetDescription>
) : null}

</React.Fragment>
))}

Expand Down

0 comments on commit ed34d78

Please sign in to comment.