-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#36] fix: clicking twice problem solved.
- Changed language links found in sidebar component to <a> tags.
- Loading branch information
Showing
3 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
import Link from "next/link"; | ||
import styles from "./menu-item.module.scss"; | ||
|
||
export default function MenuItem({ href, children, lang }) { | ||
export default function MenuItem({ href, children, lang, refresh }) { | ||
// TODO: Ignore warning from here | ||
return ( | ||
<li> | ||
<Link href={href} locale={lang}> | ||
<a className={styles.container}>{children}</a> | ||
</Link> | ||
</li> | ||
<> | ||
{refresh ? ( | ||
<li> | ||
<a href={href} locale={lang} className={styles.container}> | ||
{children} | ||
</a> | ||
</li> | ||
) : ( | ||
<li> | ||
<Link href={href} locale={lang}> | ||
<a className={styles.container}>{children}</a> | ||
</Link> | ||
</li> | ||
)} | ||
</> | ||
); | ||
} | ||
/* TODO: fix the bug about links */ |