Skip to content

Commit

Permalink
fixed all wrong navbar links (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravsingh1281 authored Jan 22, 2025
2 parents a3dfa21 + 254cac8 commit d2f5c56
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/Header-section/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Navbar = () => {
const [navLinkbgColor, setNavlinkbgColor] = useState(true);
const [activeSection, setActiveSection] = useState("home"); // Track active section
const [checkToken, setCheckToken] = useState(false);
const sectionIds = ["home", "Service", "About Us", "Contact Us", "FAQ","RentCalculator"]; // Section IDs
const sectionIds = ["home", "Service", "AboutUs", "ContactUs", "FAQ","RentCalculator"]; // Section IDs

// Toggle Dark Mode
const toggleDarkMode = () => {
Expand Down
20 changes: 10 additions & 10 deletions src/components/Header-section/RentNavbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const RentNavbar = () => {
<div className="mt-4 h-[2px] w-600 bg-textWhite rounded-full"></div>

<div className="flex flex-col gap-8 justify-center items-center mt-10">
<a href="/#home" aria-current="page">
<a href="#home" aria-current="page">
<div
className="text-textWhite "
// onClick={() => {
Expand All @@ -59,7 +59,7 @@ const RentNavbar = () => {
</div>
</a>

<a href="/#Service" aria-current="page">
<a href="#Service" aria-current="page">
<div
className="text-textWhite "
// onClick={() => {
Expand All @@ -69,7 +69,7 @@ const RentNavbar = () => {

</div>
</a>
<a href="/#AboutUs" aria-current="page">
<a href="#AboutUs" aria-current="page">
<div
className="text-textWhite "
// onClick={() => {
Expand All @@ -79,7 +79,7 @@ const RentNavbar = () => {
ABOUT
</div>
</a>
<a href="/#ContactUs" aria-current="page">
<a href="#ContactUs" aria-current="page">
<div
className="text-textWhite "
// onClick={() => {
Expand All @@ -89,7 +89,7 @@ const RentNavbar = () => {
CONTACT
</div>
</a>
<a href="/#FAQ" aria-current="page">
<a href="#FAQ" aria-current="page">
<div
className="text-textWhite"
// onClick={() => {
Expand Down Expand Up @@ -209,7 +209,7 @@ const RentNavbar = () => {
>
<ul className="flex flex-row lg:gap-10 md:gap-6 font-medium">
<li className=" navbar2 hover:scale-[1.081] hover transition duration-300">
<a href="/#home" aria-current="page">
<a href="#home" aria-current="page">
{activeSection === "home" ? (
<h1 className="text-green">HOME</h1>
) : (
Expand All @@ -219,7 +219,7 @@ const RentNavbar = () => {
</li>

<li className="navbar2 hover:scale-[1.081] hover transition duration-300">
<a href="/#Service" aria-current="page">
<a href="#Service" aria-current="page">
{activeSection === "Service" ? (
<h1 className="text-green">RENTALS</h1>
) : (
Expand All @@ -229,7 +229,7 @@ const RentNavbar = () => {
</li>

<li className="navbar2 hover:scale-[1.081] hover transition duration-300">
<a href="/#AboutUs" aria-current="page">
<a href="#AboutUs" aria-current="page">
{activeSection === "AboutUs" ? (
<h1 className="text-green">ABOUT</h1>
) : (
Expand All @@ -239,7 +239,7 @@ const RentNavbar = () => {
</li>

<li className="navbar2 hover:scale-[1.081] hover transition duration-300">
<a href="/#ContactUs" aria-current="page">
<a href="#ContactUs" aria-current="page">
{activeSection === "ContactUs" ? (
<h1 className="text-green">CONTACT</h1>
) : (
Expand All @@ -248,7 +248,7 @@ const RentNavbar = () => {
</a>
</li>
<li className="hover:scale-[1.081] hover transition duration-300">
<a href="/#FAQ" aria-current="page">
<a href="#FAQ" aria-current="page">
{activeSection === "FAQ" ? (
<h1 className="text-green">FAQ</h1>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/faq/FAQ.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const faqData = [

const FAQ = () => {
return (
<section className="w-full py-16 md:py-24 lg:py-32 bg-secondary/20">
<section id='FAQ' className="w-full py-16 md:py-24 lg:py-32 bg-secondary/20">
<div className="container mx-auto px-4 md:px-6 max-w-4xl">
<div className="w-full space-y-8">
<h2 className="text-4xl font-bold tracking-tight text-center text-foreground mb-12">Frequently Asked Questions</h2>
Expand Down

0 comments on commit d2f5c56

Please sign in to comment.