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