Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: LocaleSwitcher components doesn't have props in mobile page. #27

Open
devchanki opened this issue Jan 3, 2025 · 0 comments
Assignees

Comments

@devchanki
Copy link

Fix

Describe your request

The LocaleSwitcher component requires type definitions for its props.

export function LocaleSwitcher({ currentLocale }: { currentLocale: string }) { 
 // ... 
}
<div
            className={cn(
              "flex cursor-pointer items-center justify-center text-sm leading-[110%] w-8 py-1 rounded-md hover:bg-neutral-800 hover:text-white/80 text-white hover:shadow-[0px_1px_0px_0px_var(--neutral-600)_inset] transition duration-200",
              locale === currentLocale
                ? "bg-neutral-800 text-white shadow-[0px_1px_0px_0px_var(--neutral-600)_inset]"
                : ""
            )}
          >
            {locale}
          </div>

However, in mobile view, the locale variable does not seem to have values, which results in missing styles for the selection.
See the screenshot below for reference:

Current:
image

Expected:
image

Steps to reproduce the behavior

  1. Go to next folder
  2. yarn && yarn build && yarn start
  3. checking validity of types

Expected behavior

build success like this

image

Screenshots

image

Additional context

I have added the locale information to address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants