Skip to content

Commit

Permalink
fix: all in-app redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
mariamarinescu committed Jan 10, 2025
1 parent 42c164f commit fb9c077
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { GrClose } from 'react-icons/gr';
import { NavLink } from 'react-router';
import { Logo } from './Logo';

const basePath = '/ji-yun';
const baseNavItemId = 'nav-menu-item';
const navLinkLabelDefaultClassName = 'block hover:text-blue-600';

Expand All @@ -20,7 +19,7 @@ export const getNavLinkCollection = (
) => [
<li key={`${id}-${baseNavItemId}-about`}>
<NavLink
to={`${basePath}/about`}
to={`/about`}
className={({ isActive }) => getNavLinkClassName(isActive)}
id={`${id}-${baseNavItemId}-about`}
aria-label="About Me"
Expand All @@ -31,7 +30,7 @@ export const getNavLinkCollection = (
</li>,
<li key={`${id}-${baseNavItemId}-profile`}>
<NavLink
to={`${basePath}/profile`}
to={`/profile`}
className={({ isActive }) => getNavLinkClassName(isActive)}
id={`${id}-${baseNavItemId}-profile`}
aria-label="My Profile"
Expand All @@ -44,7 +43,7 @@ export const getNavLinkCollection = (
</li>,
<li key={`${id}-${baseNavItemId}-projects`}>
<NavLink
to={`${basePath}/projects`}
to={`/projects`}
id={`${id}-${baseNavItemId}-projects`}
aria-label="Projects"
className={({ isActive }) => getNavLinkClassName(isActive)}
Expand All @@ -57,7 +56,7 @@ export const getNavLinkCollection = (
</li>,
<li key={`${id}-${baseNavItemId}-contact`}>
<NavLink
to={`${basePath}/contact`}
to={`/contact`}
id={`${id}-${baseNavItemId}-contact`}
aria-label="Contact me"
className={({ isActive }) => getNavLinkClassName(isActive)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/projects/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ProjectCard: FC<{
return (
<MotionLayoutWrapper>
<Link
to={`/ji-yun/projects/${project?.id}`}
to={`/projects/${project?.id}`}
aria-label="Single Project"
onClick={() => setProjectDetailsModalOpen(true)}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/projects/ProjectList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const ProjectList = () => {

const closeProjectDetailsModal = () => {
setProjectDetailsModalOpen(false);
navigate('/ji-yun/projects', { replace: true });
navigate('/projects', { replace: true });
};

return (
Expand Down

0 comments on commit fb9c077

Please sign in to comment.