Skip to content

Commit

Permalink
Merge pull request #143 from Itheum/d-damian
Browse files Browse the repository at this point in the history
go back to same page after login fix #142
  • Loading branch information
newbreedofgeek authored Sep 7, 2023
2 parents ef98d7d + 9330cb0 commit b7ff558
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/components/Layout/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useState } from "react";
import { Home, Menu, Store, Wallet } from "lucide-react";
import { Link } from "react-router-dom";
import lightLogo from "assets/img/logo-icon-b.png";
import darkLogo from "assets/img/logo-sml-d.png";
Expand All @@ -9,18 +10,7 @@ import { useGetAccount, useGetIsLoggedIn } from "hooks";
import { APP_MAPPINGS } from "libs/utils/constant";
import { returnRoute } from "pages/Home";
import { routeNames } from "routes";
import { SwitchButton } from "./SwitchButton";
import { Button } from "../../libComponents/Button";
import {
NavigationMenu,
NavigationMenuContent,
NavigationMenuItem,
NavigationMenuLink,
NavigationMenuList,
NavigationMenuTrigger,
navigationMenuTriggerStyle,
} from "../../libComponents/NavigationMenu";
import { cn } from "../../libs/utils";
import {
DropdownMenu,
DropdownMenuContent,
Expand All @@ -30,8 +20,18 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "../../libComponents/DropdownMenu";
import { Home, Menu, Store, Wallet } from "lucide-react";
import {
NavigationMenu,
NavigationMenuContent,
NavigationMenuItem,
NavigationMenuLink,
NavigationMenuList,
NavigationMenuTrigger,
navigationMenuTriggerStyle,
} from "../../libComponents/NavigationMenu";
import { useTheme } from "../../libComponents/ThemeProvider";
import { cn } from "../../libs/utils";
import { SwitchButton } from "./SwitchButton";

export const Navbar = () => {
const isLoggedIn = useGetIsLoggedIn();
Expand Down Expand Up @@ -123,7 +123,7 @@ export const Navbar = () => {
</>
) : (
<NavigationMenuItem>
<Link to={routeNames.unlock}>
<Link to={routeNames.unlock} state={{ from: location.pathname }}>
<div className="bg-gradient-to-r from-yellow-300 to-orange-500 p-[1px] rounded-md justify-center">
<Button
className="dark:bg-[#0f0f0f] dark:text-white hover:dark:bg-[#0f0f0f20] border-0 rounded-lg font-medium tracking-wide !text-lg"
Expand Down Expand Up @@ -156,7 +156,7 @@ export const Navbar = () => {
</div>
</Link>
) : (
<Link to={routeNames.unlock}>
<Link to={routeNames.unlock} state={{ from: location.pathname }}>
<div className="bg-gradient-to-r from-yellow-300 to-orange-500 p-[1px] rounded-md justify-center">
<Button
className="dark:bg-[#0f0f0f] dark:text-white hover:dark:bg-[#0f0f0f20] border-0 rounded-lg font-medium tracking-wide !text-lg"
Expand Down

0 comments on commit b7ff558

Please sign in to comment.