Skip to content

Commit

Permalink
fix: RevolvingBox translations (#994)
Browse files Browse the repository at this point in the history
* call useTranslation hook inside RevolvingBox

* try and trigger rerender for subcomponent on lang change

---------

Signed-off-by: Joe Karow <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
JoeKarow and kodiakhq[bot] authored Jan 5, 2024
1 parent d8e0b61 commit 5197eb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui/components/sections/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
useMantineTheme,
} from '@mantine/core'
import { useReducedMotion } from '@mantine/hooks'
import { useRouter } from 'next/router'
import { Trans, useTranslation } from 'next-i18next'
import { useEffect, useState } from 'react'

Expand Down Expand Up @@ -83,7 +84,8 @@ const getRandomNumber = (min: number, max: number) => {
}

const RevolvingBox = ({ role }: RevolvingBoxProps) => {
const { t } = useTranslation('landingPage')
const router = useRouter()
const { t } = useTranslation('landingPage', { lng: router.locale })
const theme = useMantineTheme()
const reduceMotion = useReducedMotion()
const services = [
Expand Down

0 comments on commit 5197eb5

Please sign in to comment.