add translate
This commit is contained in:
@@ -3,10 +3,12 @@ import { useState, useRef } from 'react';
|
||||
import Link from 'next/link';
|
||||
import clsx from 'clsx';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export default function DropDownList() {
|
||||
const pathname = usePathname();
|
||||
const [dropDownExpanded, setDropDownExpanded] = useState(false);
|
||||
const t = useTranslations('Global');
|
||||
|
||||
function dropDownHandler() {
|
||||
setDropDownExpanded(!dropDownExpanded);
|
||||
@@ -14,15 +16,15 @@ export default function DropDownList() {
|
||||
|
||||
const links = [
|
||||
{
|
||||
name: 'Маркировка фото',
|
||||
name: t('photo-marking'),
|
||||
href: '/pages/marking-photo'
|
||||
},
|
||||
{
|
||||
name: 'Маркировка видео',
|
||||
name: t('video-marking'),
|
||||
href: '/pages/marking-video'
|
||||
},
|
||||
{
|
||||
name: 'Маркировка аудио',
|
||||
name: t('audio-marking'),
|
||||
href: '/pages/marking-audio'
|
||||
}
|
||||
];
|
||||
@@ -40,7 +42,9 @@ export default function DropDownList() {
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2l-5.37.84z"></path>
|
||||
</svg>
|
||||
<p>Маркировка</p>
|
||||
<p>
|
||||
{t('marking')}
|
||||
</p>
|
||||
<svg className={`${styles['dropdown-arrow']}`} viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M7 10l5 5 5-5z"></path>
|
||||
</svg>
|
||||
|
||||
Reference in New Issue
Block a user