Skip to content

Commit

Permalink
Merge pull request #24 from osakunta/next-site
Browse files Browse the repository at this point in the history
Config and Nav hotfix
  • Loading branch information
YB-BigSwan authored Aug 8, 2024
2 parents e289826 + 4748597 commit fd2ee5d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
30 changes: 17 additions & 13 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,13 @@ const Navbar = ({ navData }: NavbarProps) => {

return (
<ListItem key={data.id} disablePadding>
<ListItemButton>
<ListItemIcon></ListItemIcon>
<Link
href={route}
locale={language}
<Link
href={route}
locale={language}
passHref
className={styles.nextLink}
>
<ListItemButton
className={
route === currentRoute
? styles.navLinkActive
Expand All @@ -128,8 +130,8 @@ const Navbar = ({ navData }: NavbarProps) => {
>
{/* @ts-ignore: Dynamic property access */}
{data[`text_${language}`]}
</Link>
</ListItemButton>
</ListItemButton>
</Link>
</ListItem>
);
})}
Expand All @@ -141,10 +143,12 @@ const Navbar = ({ navData }: NavbarProps) => {
<List disablePadding>
{navForMembers.map((data: any) => (
<ListItem key={data.id} disablePadding>
<ListItemButton>
<ListItemIcon></ListItemIcon>
<Link
href={`/${data.text_en.toLowerCase().replace(" ", "-")}`}
<Link
href={`/${data.text_en.toLowerCase().replace(" ", "-")}`}
passHref
className={styles.nextLink}
>
<ListItemButton
className={
`/${data.text_en.toLowerCase().replace(" ", "-")}` ===
currentRoute
Expand All @@ -153,8 +157,8 @@ const Navbar = ({ navData }: NavbarProps) => {
}
>
{data[`text_${language}`]}
</Link>
</ListItemButton>
</ListItemButton>
</Link>
</ListItem>
))}
</List>
Expand Down
22 changes: 8 additions & 14 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
const config = async () => {
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
output: "export",
images: {
unoptimized: true,
},
reactStrictMode: true,
};

return nextConfig;
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
images: {
unoptimized: true,
},
reactStrictMode: true,
};

export default config;
export default nextConfig;
7 changes: 7 additions & 0 deletions styles/Navbar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,24 @@
top: 0;
}

.nextLink {
text-decoration: none;
width: 100%;
}

.navLink {
text-decoration: none;
font-size: 1.2rem;
color: var(--black);
padding-left: 3rem;
}

.navLinkActive {
text-decoration: none;
font-size: 1.2rem;
font-weight: 700;
color: var(--orange200);
padding-left: 3rem;
}

.languageButton {
Expand Down

0 comments on commit fd2ee5d

Please sign in to comment.