-
Notifications
You must be signed in to change notification settings - Fork 80
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
Fix: Testimonial link on Leaderboard page does not navigate to the Testimonial page #354
Fix: Testimonial link on Leaderboard page does not navigate to the Testimonial page #354
Conversation
@Shahbaz898414 is attempting to deploy a commit to the lucif3rin's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congratulations🎉 on creating your first pull request in Git-re.' first pull request
components/navbar.tsx
Outdated
{currentPath === "/leaderboard" ? ( | ||
<Link | ||
href={"/#userTestimonials"} | ||
className="text-navbarSecondary hover:text-primary font-semibold transition md:block hidden dark:text-white" | ||
style={{ scrollBehavior: "smooth" }} | ||
> | ||
Testimonial | ||
</Link> | ||
) : ( | ||
<a | ||
href="#userTestimonials" | ||
className="text-navbarSecondary hover:text-primary font-semibold transition md:block hidden dark:text-white" | ||
style={{ scrollBehavior: "smooth" }} | ||
> | ||
Testimonial | ||
</a> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If i remove this will not work,
can you plz provide me more information ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The simple solution is to just change the href and don't need this pass checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bro can you connect with me on Linkedin
components/navbar.tsx
Outdated
<a | ||
href="#userTestimonials" | ||
className="text-navbarSecondary hover:text-primary font-semibold transition md:block hidden dark:text-white" | ||
style={{ scrollBehavior: "smooth" }} | ||
> | ||
Testimonial | ||
</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One line fix: revert this component and update the href
to href="/#userTestimonials"
. Also, change the <a>
tag to use <Link>
from next/link
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implement this @Shahbaz898414
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
components/navbar.tsx
Outdated
@@ -1,18 +1,30 @@ | |||
import React from "react"; | |||
"use client"; // Mark this component as a Client Component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
components/navbar.tsx
Outdated
import { createClientComponentClient } from "@supabase/auth-helpers-nextjs"; | ||
import { usePathname } from "next/navigation"; // Import the usePathname hook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { createClientComponentClient } from "@supabase/auth-helpers-nextjs";
only this one or both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both.
components/navbar.tsx
Outdated
import { ModeToggle } from "./shared/ToggleBg"; | ||
import { GitHubLogoIcon } from "@radix-ui/react-icons"; | ||
import { IoMdGitNetwork } from "react-icons/io"; | ||
import Link from "next/link"; | ||
import { Button } from "./ui/button"; | ||
import AuthButton from "./AuthButton"; | ||
import Hamburger from "./Hamburger"; | ||
import { supabaseServer } from "@/utils/supabase/server"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert
components/navbar.tsx
Outdated
export default async function Navbar() { | ||
export default function Navbar() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert to original asynchronous function
components/navbar.tsx
Outdated
<AuthButton user={data.user} /> | ||
<AuthButton user={user} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert to original
middleware.ts
Outdated
@@ -22,3 +22,4 @@ export const config = { | |||
"/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", | |||
], | |||
}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra whitespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve this please if not
.env.example
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert the file delete.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@Shahbaz898414 Revert the file |
@dhairyathedev Done bro plz check |
.env.example
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo deletion of this file please
middleware.ts
Outdated
@@ -22,3 +22,4 @@ export const config = { | |||
"/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", | |||
], | |||
}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve this please if not
@ashutosh-rath02 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This pull request addresses the issue where the link to the Testimonial page on the Leaderboard page does not navigate to the Testimonial page. This fix ensures that users can access the Testimonial page by clicking the link on the Leaderboard page.
Changes Made
href
attribute for the Testimonial link on the Leaderboard page to ensure proper navigation.Issue Reference
Fixes [#287 ]
Steps to Test
Expected Behavior
After clicking the link to the Testimonial page on the Leaderboard page, the user should be redirected to the Testimonial page.
Screenshots