Skip to content

Commit

Permalink
🐛 #324 言語メニューのリンク先設定ロジックが間違っていたので修正
Browse files Browse the repository at this point in the history
  • Loading branch information
keitakn committed Oct 4, 2024
1 parent 5d97066 commit 03d1b33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/_components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { GlobeIcon } from '@/app/_components/icons/GlobeIcon';
import { RightIcon } from '@/app/_components/icons/RightIcon';
import { LoginButton } from '@/app/_components/LoginButton';
import { createExternalTransmissionPolicyLinksFromLanguages } from '@/features/externalTransmissionPolicy';
import type { Language } from '@/features/language';
import { removeLanguageFromAppPath, type Language } from '@/features/language';
import { createPrivacyPolicyLinksFromLanguages } from '@/features/privacyPolicy';
import { createTermsOfUseLinksFromLanguages } from '@/features/termsOfUse';
import { appPathList, type IncludeLanguageAppPath } from '@/features/url';
Expand All @@ -31,6 +31,7 @@ export const Header = ({ language, currentUrlPath }: Props): JSX.Element => {
const privacy = createPrivacyPolicyLinksFromLanguages(language);
const externalTransmissionPolicy =
createExternalTransmissionPolicyLinksFromLanguages(language);
const removedLanguagePath = removeLanguageFromAppPath(currentUrlPath);

Check warning on line 34 in src/app/_components/Header.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/Header.tsx#L29-L34

Added lines #L29 - L34 were not covered by tests

return (
<ReactAriaHeader className="w-full border-b border-orange-300 bg-orange-500">
Expand Down Expand Up @@ -115,7 +116,7 @@ export const Header = ({ language, currentUrlPath }: Props): JSX.Element => {
}`}

Check warning on line 116 in src/app/_components/Header.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/Header.tsx#L109-L116

Added lines #L109 - L116 were not covered by tests
>
<Link
href={currentUrlPath}
href={removedLanguagePath}
className="flex w-full items-center"

Check warning on line 120 in src/app/_components/Header.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/Header.tsx#L118-L120

Added lines #L118 - L120 were not covered by tests
>
<span className="flex items-center gap-2">
Expand All @@ -134,7 +135,7 @@ export const Header = ({ language, currentUrlPath }: Props): JSX.Element => {
}`}

Check warning on line 135 in src/app/_components/Header.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/Header.tsx#L130-L135

Added lines #L130 - L135 were not covered by tests
>
<Link
href={currentUrlPath}
href={`/en${removedLanguagePath}`}
className="flex w-full items-center"

Check warning on line 139 in src/app/_components/Header.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/Header.tsx#L137-L139

Added lines #L137 - L139 were not covered by tests
>
<span className="flex items-center gap-2">
Expand Down

0 comments on commit 03d1b33

Please sign in to comment.