mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-16 05:11:10 -05:00
🐛 fix(locale): Document
This commit is contained in:
parent
0a8109bbc4
commit
6f0fa20737
@ -9,9 +9,11 @@ import { useOutsideClick } from '@shadcn/ui/hooks/use-outside-click';
|
|||||||
import { cn } from '@shadcn/ui/lib/utils';
|
import { cn } from '@shadcn/ui/lib/utils';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { AnimatePresence, motion } from 'framer-motion';
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
|
import { useTranslations } from 'next-intl';
|
||||||
import { useEffect, useId, useRef, useState } from 'react';
|
import { useEffect, useId, useRef, useState } from 'react';
|
||||||
|
|
||||||
export function DocumentButton({ items }: { items: API.DocumentItem[] }) {
|
export function DocumentButton({ items }: { items: API.DocumentItem[] }) {
|
||||||
|
const t = useTranslations('document');
|
||||||
const [active, setActive] = useState<API.DocumentItem | boolean | null>(null);
|
const [active, setActive] = useState<API.DocumentItem | boolean | null>(null);
|
||||||
const id = useId();
|
const id = useId();
|
||||||
const ref = useRef<HTMLDivElement>(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
@ -126,7 +128,7 @@ export function DocumentButton({ items }: { items: API.DocumentItem[] }) {
|
|||||||
'rounded-full',
|
'rounded-full',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
阅读
|
{t('read')}
|
||||||
</motion.button>
|
</motion.button>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import { useOutsideClick } from '@shadcn/ui/hooks/use-outside-click';
|
|||||||
import { cn } from '@shadcn/ui/lib/utils';
|
import { cn } from '@shadcn/ui/lib/utils';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { AnimatePresence, motion } from 'framer-motion';
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
|
import { useTranslations } from 'next-intl';
|
||||||
import { useEffect, useId, useRef, useState } from 'react';
|
import { useEffect, useId, useRef, useState } from 'react';
|
||||||
|
|
||||||
interface Item {
|
interface Item {
|
||||||
@ -15,6 +16,8 @@ interface Item {
|
|||||||
title: string;
|
title: string;
|
||||||
}
|
}
|
||||||
export function TutorialButton({ items }: { items: Item[] }) {
|
export function TutorialButton({ items }: { items: Item[] }) {
|
||||||
|
const t = useTranslations('document');
|
||||||
|
|
||||||
const [active, setActive] = useState<Item | boolean | null>(null);
|
const [active, setActive] = useState<Item | boolean | null>(null);
|
||||||
const id = useId();
|
const id = useId();
|
||||||
const ref = useRef<HTMLDivElement>(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
@ -143,7 +146,7 @@ export function TutorialButton({ items }: { items: Item[] }) {
|
|||||||
'rounded-full',
|
'rounded-full',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
阅读
|
{t('read')}
|
||||||
</motion.button>
|
</motion.button>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
"back": "Back",
|
"all": "All",
|
||||||
"category": "Category",
|
"document": "Document",
|
||||||
"read": "Read",
|
"read": "Read",
|
||||||
"tags": "Tags",
|
"tutorial": "Tutorial"
|
||||||
"title": "Title",
|
|
||||||
"updatedAt": "Updated At"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"all": "全部",
|
"all": "全部",
|
||||||
"document": "文档",
|
"document": "文档",
|
||||||
|
"read": "阅读",
|
||||||
"tutorial": "教程"
|
"tutorial": "教程"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user