add translate

This commit is contained in:
smanylov
2025-12-12 11:00:23 +07:00
parent b63828befb
commit b5b66695df
10 changed files with 215 additions and 149 deletions
+8 -4
View File
@@ -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>