Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Solved Issue #10327 : Remove login link from footer section #10362

Merged
merged 5 commits into from
Jun 8, 2024
Merged
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
7 changes: 5 additions & 2 deletions components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import va from "@vercel/analytics";

import { useSession } from 'next-auth/react';
import {
FaLinkedin,
FaGithub,
Expand All @@ -15,12 +15,15 @@ import { BASE_GITHUB_PROJECT_URL, BASE_GITHUB_URL } from "@constants/index";
import LogoWide from "@public/logos/LogoWide";

export default function Footer() {
const { data: session, status } = useSession();
const loading = status === 'loading';
const navigation = {
solutions: [
{ name: "Search", href: "/search", external: false },
{ name: "Events", href: "/events", external: false },
{ name: "Map", href: "/map", external: false },
{ name: "Login", href: "/auth/signin", external: false },
// Only include the "Login" link if the user is not logged in
...(!session && !loading ? [{ name: "Login", href: "/auth/signin", external: false }] : []),
{
name: "Open Source Roadmap",
href: "/docs/open-source-roadmap",
Expand Down
Loading