Skip to content

Commit

Permalink
feat(i18n): base info
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-zone committed May 24, 2024
1 parent 6117333 commit f8336b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fabritor/UI/header/BaseInfo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { useState, useEffect, useContext } from 'react';
import { Typography } from 'antd';
import { GloablStateContext } from '@/context';
import { useTranslation } from '@/i18n/utils';

const { Text } = Typography;

export default function BaseInfo () {
const [desc, setDesc] = useState('');
const { editor } = useContext(GloablStateContext);
const { t } = useTranslation();

const handleChange = (v) => {
const _v = v || '我的画板 by fabritor';
const _v = v || t('header.fabritor_desc');
setDesc(_v);
if (!editor) return;
const { sketch } = editor;
Expand Down

0 comments on commit f8336b6

Please sign in to comment.