Skip to content

Commit

Permalink
Added a register button
Browse files Browse the repository at this point in the history
  • Loading branch information
rishit-singh committed Jan 9, 2024
1 parent eea4a5c commit c56a9f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frontend/src/app/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { SetCurrentPage, selectCurrentPage } from "./slices/pageSlice";
import { useSelector } from "react-redux";
import { AppDispatch } from "./stores/store";
import { waitForDebugger } from "inspector";
import { Button } from "@nextui-org/react";
import Conditional from "./Conditional";

interface NavBarProps
{
Expand Down Expand Up @@ -39,6 +41,8 @@ export default function NavBar({ Pages } : NavBarProps)

const [page, setPage] = useState(currentPage);

const formURL = "https://forms.gle/gPdqMB5ijafDMRAY8";

const onClickHandler = (url: string) => {
router.push(url);
mainDispatch(SetCurrentPage(url));
Expand All @@ -63,6 +67,9 @@ export default function NavBar({ Pages } : NavBarProps)
<div className={"col-start-2"}>
<div className={"nav_button_container flex max-[500px]:gap-x-3 gap-x-7 mt-5 max-[500px]:mt-6"}>
{navButtons}
<Conditional Condition={currentPage == "/"}>
<Button onClick={() => router.push(formURL) } className="bg-lang-orange rounded text-white max-[600px]:text-[10px] max-[600px]:h-8 max-[600px]:w-15 h-10">Register</Button>
</Conditional>
</div>
</div>
<div></div>
Expand All @@ -71,3 +78,4 @@ export default function NavBar({ Pages } : NavBarProps)
);
}


0 comments on commit c56a9f5

Please sign in to comment.