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

Fix: Testimonial link on Leaderboard page does not navigate to the Testimonial page #354

Merged

Conversation

Shahbaz898414
Copy link
Contributor

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

  • Corrected the href attribute for the Testimonial link on the Leaderboard page to ensure proper navigation.

Issue Reference

Fixes [#287 ]

Steps to Test

  1. Go to the Leaderboard page.
  2. Click on the Testimonial link.
  3. Verify that the page navigates to the Testimonial page.

Expected Behavior

After clicking the link to the Testimonial page on the Leaderboard page, the user should be redirected to the Testimonial page.

Screenshots

image

Copy link

vercel bot commented Jul 2, 2024

@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.

@ashutosh-rath02
Copy link
Owner

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! 😊

Copy link

@github-actions github-actions bot left a 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

@ashutosh-rath02
Copy link
Owner

@dhairyathedev

Comment on lines 48 to 64
{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>
)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Copy link
Contributor Author

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.

Copy link
Contributor Author

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

Comment on lines 36 to 42
<a
href="#userTestimonials"
className="text-navbarSecondary hover:text-primary font-semibold transition md:block hidden dark:text-white"
style={{ scrollBehavior: "smooth" }}
>
Testimonial
</a>
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implement this @Shahbaz898414

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -1,18 +1,30 @@
import React from "react";
"use client"; // Mark this component as a Client Component
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

Comment on lines 11 to 12
import { createClientComponentClient } from "@supabase/auth-helpers-nextjs";
import { usePathname } from "next/navigation"; // Import the usePathname hook
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both.

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";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

Comment on lines 11 to 14
export default async function Navbar() {
export default function Navbar() {
Copy link
Contributor

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

Comment on lines 51 to 73
<AuthButton user={data.user} />
<AuthButton user={user} />
Copy link
Contributor

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)$).*)",
],
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra whitespace

Copy link
Owner

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert the file delete.

Copy link

vercel bot commented Jul 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
git-re ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2024 2:40pm

@dhairyathedev
Copy link
Contributor

@Shahbaz898414 Revert the file navbar.tsx to original state implement this solution: #354 (comment)

@Shahbaz898414
Copy link
Contributor Author

@Shahbaz898414 Revert the file navbar.tsx to original state implement this solution: #354 (comment)

@dhairyathedev Done bro plz check

.env.example Outdated
Copy link
Owner

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)$).*)",
],
};

Copy link
Owner

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

@Shahbaz898414
Copy link
Contributor Author

@ashutosh-rath02
done bro

Copy link
Owner

@ashutosh-rath02 ashutosh-rath02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashutosh-rath02 ashutosh-rath02 merged commit 36d19a4 into ashutosh-rath02:main Jul 11, 2024
10 checks passed
@Shahbaz898414 Shahbaz898414 deleted the Resolved_Testimonial branch July 11, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants