Skip to content

Commit

Permalink
🐛 bugfix: changed paths for bugfix of 404 on refresh of deployed pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayngie committed Dec 20, 2023
1 parent 1866c07 commit f53d90a
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 65 deletions.
12 changes: 6 additions & 6 deletions src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ export const router = createBrowserRouter([
index: true,
},
{
path: "/natural-guide-to-gestational-diabetes/life",
path: "/life",
element: <LifeAdvice></LifeAdvice>,
},
{
path: "/natural-guide-to-gestational-diabetes/training",
path: "/training",
element: <TrainingAdvice></TrainingAdvice>,
},
{
path: "/natural-guide-to-gestational-diabetes/food",
path: "/food",
element: <FoodAdvice></FoodAdvice>,
},
{
path: "/natural-guide-to-gestational-diabetes/recipes",
path: "/recipes",
element: <RecipeTips></RecipeTips>,
},
{
path: "/natural-guide-to-gestational-diabetes/search",
path: "/search",
element: <SearchFood></SearchFood>,
},
{
path: "/natural-guide-to-gestational-diabetes/about",
path: "/about",
element: <AboutProject></AboutProject>,
},
],
Expand Down
12 changes: 6 additions & 6 deletions src/components/layout/header/desktopNavBar/DesktopNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ export const DesktopNavBar = () => {
<Link to={"/natural-guide-to-gestational-diabetes/"}>Start</Link>
</li>
<li>
<Link to={"/natural-guide-to-gestational-diabetes/life"}>Levnadsråd</Link>
<Link to={"life"}>Levnadsråd</Link>
</li>
<li>
<Link to={"/natural-guide-to-gestational-diabetes/training"}>Träning</Link>
<Link to={"training"}>Träning</Link>
</li>
<li>
<Link to={"/natural-guide-to-gestational-diabetes/food"}>Kost</Link>
<Link to={"/food"}>Kost</Link>
</li>
<li>
<Link to={"/natural-guide-to-gestational-diabetes/recipes"}>Recept</Link>
<Link to={"/recipes"}>Recept</Link>
</li>
<li>
<Link to={"/natural-guide-to-gestational-diabetes/search"}>Sök livsmedel</Link>
<Link to={"/search"}>Sök livsmedel</Link>
</li>
<li>
<Link to={"/natural-guide-to-gestational-diabetes/about"}>Om detta projekt</Link>
<Link to={"/about"}>Om detta projekt</Link>
</li>
</ul>
</StyledDesktopNavBar>
Expand Down
104 changes: 51 additions & 53 deletions src/components/layout/header/hamburgerMenu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,58 +14,56 @@ export const Menu = ({ open, setOpen }: IMenuProps) => {
setOpen(false);
};
return (
<>
<StyledMenu open={open} aria-hidden={!isHidden}>
<Link
to={"/natural-guide-to-gestational-diabetes/"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Start
</Link>
<Link
to={"/natural-guide-to-gestational-diabetes/life"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Levnadsråd
</Link>
<Link
to={"/natural-guide-to-gestational-diabetes/training"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Träning
</Link>
<Link
to={"/natural-guide-to-gestational-diabetes/food"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Kost
</Link>
<Link
to={"/natural-guide-to-gestational-diabetes/recipes"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Recept
</Link>
<Link
to={"/natural-guide-to-gestational-diabetes/search"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Sök livsmedel
</Link>
<Link
to={"/natural-guide-to-gestational-diabetes/about"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Om detta projekt
</Link>
</StyledMenu>
</>
<StyledMenu open={open} aria-hidden={!isHidden}>
<Link
to={"/natural-guide-to-gestational-diabetes/"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Start
</Link>
<Link
to={"/life"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Levnadsråd
</Link>
<Link
to={"/training"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Träning
</Link>
<Link
to={"/food"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Kost
</Link>
<Link
to={"/recipes"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Recept
</Link>
<Link
to={"/search"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Sök livsmedel
</Link>
<Link
to={"/about"}
onClick={handleClick}
tabIndex={tabIndex}
aria-hidden={true}>
Om detta projekt
</Link>
</StyledMenu>
);
};

0 comments on commit f53d90a

Please sign in to comment.