initiate drf app
This commit is contained in:
31
frontend/components/LangSwitcher.tsx
Normal file
31
frontend/components/LangSwitcher.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
'use client'
|
||||
|
||||
import React, { useState } from 'react'
|
||||
|
||||
const LangSwitcher = () => {
|
||||
const [selectedLang, setSelectedLang] = useState('ru')
|
||||
|
||||
return (
|
||||
<div className="flex items-center space-x-2">
|
||||
<button
|
||||
onClick={() => setSelectedLang('ru')}
|
||||
className={`${
|
||||
selectedLang === 'ru' ? 'text-orange' : 'text-gray-500'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
RU
|
||||
</button>
|
||||
<span className="text-gray-500">/</span>
|
||||
<button
|
||||
onClick={() => setSelectedLang('en')}
|
||||
className={`${
|
||||
selectedLang === 'en' ? 'text-orange' : 'text-gray-500'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
EN
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default LangSwitcher
|
||||
Reference in New Issue
Block a user