1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

refactor: 'use client' when appropriate

This commit is contained in:
2023-07-30 18:50:14 +02:00
parent 70603f1444
commit 6d0dcb50a7
11 changed files with 21 additions and 13 deletions

View File

@ -1,3 +1,5 @@
'use client'
import { useCallback, useEffect, useState, useRef } from 'react'
import useTranslation from 'next-translate/useTranslation'
import setLanguage from 'next-translate/setLanguage'
@ -61,7 +63,7 @@ export const Language: React.FC = () => {
>
{i18n.locales.map((language, index) => {
if (language === currentLanguage) {
return null
return <></>
}
return (
<li

View File

@ -1,3 +1,5 @@
'use client'
import { useEffect, useState } from 'react'
import classNames from 'clsx'
import { useTheme } from 'next-themes'