Skip to content

Commit e38551a

Browse files
melissawmCopilot
andauthored
Apply suggestions from Copilot code review
Co-authored-by: Copilot <[email protected]>
1 parent 84c1c9b commit e38551a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/components/donate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
Text,
88
} from '@chakra-ui/react'
99

10-
import { LanguageSwitcher } from '@/components/language-switcher'
10+
1111

1212
import { Heading, Image, Link } from '@/components/mdx'
1313

src/components/language-switcher.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function getLocaleLabel(locale) {
2828
}
2929

3030
export const LanguageSwitcher = () => {
31-
const { t } = useLingui()
31+
3232
const router = useRouter()
3333
const pathname = usePathname()
3434

@@ -43,7 +43,7 @@ export const LanguageSwitcher = () => {
4343
useEffect(() => {
4444
const storedLocale = localStorage.getItem('locale')
4545
if (storedLocale && storedLocale !== router.locale) {
46-
changeLocale({ target: { value: storedLocale } })
46+
changeLocale()
4747
}
4848
}, [])
4949
return (

src/components/layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Layout = ({
2121
*/
2222
const { t } = useLingui()
2323
const router = useRouter()
24-
const { pathname, asPath, query } = router
24+
2525

2626
const bannerTitle = t`Check out the latest blog post:`
2727
// The first link will be the main description for the banner

0 commit comments

Comments
 (0)