Skip to content

Commit b9a030f

Browse files
committed
fix: anime header issue #135
1 parent 815a211 commit b9a030f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/app/robots.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ async function robots(): Promise<MetadataRoute.Robots> {
1212
const postUrls = posts.map(post => `/${post.slug}`)
1313

1414
// Pages settings
15-
const showAnime = config.anilist_username !== null && config.anilist_username !== ''
15+
const showAnime = config.anilist_username === undefined || config.anilist_username !== null || config.anilist_username !== ''
1616

1717
const allowList = [
1818
'/',

src/app/sitemap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async function sitemap(): Promise<MetadataRoute.Sitemap> {
2020
}))
2121

2222
// Pages settings
23-
const showAnime = config.anilist_username !== null && config.anilist_username !== ''
23+
const showAnime = config.anilist_username === undefined || config.anilist_username !== null || config.anilist_username !== ''
2424

2525
const pages = [`${siteUrl}/posts`, `${siteUrl}/about`, `${siteUrl}/friends`]
2626

src/components/common/HeaderMenu.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const HeaderMenu = ({ config, isMobile, ulClassName, onClickHandler }: HeaderMen
3939
{ href: '/about', label: translation.about.title, icon: <FaInfo /> },
4040
]
4141

42-
if (config.anilist_username !== null && config.anilist_username !== '') {
42+
if (config.anilist_username !== undefined && config.anilist_username !== null && config.anilist_username.length > 1) {
4343
menuItems[3].children = [{ href: '/about/anime', label: translation.anime.title, icon: <FaTv /> }]
4444
}
4545

@@ -125,6 +125,8 @@ const HeaderMenu = ({ config, isMobile, ulClassName, onClickHandler }: HeaderMen
125125
<li key={subItem.href}>
126126
<Link
127127
href={subItem.href}
128+
title={subItem.label}
129+
onClick={onClickHandler}
128130
className={`flex items-center gap-2 py-2 text-base hover:text-[var(--sakuraPink)]
129131
${currentPath.startsWith(subItem.href) ? 'text-[var(--sakuraPink)]' : ''}
130132
`}

0 commit comments

Comments
 (0)