mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
32 lines
826 B
TypeScript
Vendored
32 lines
826 B
TypeScript
Vendored
import { useState } from 'react';
|
|
import { useLocation } from 'react-router-dom';
|
|
import { Breadcrumb } from 'antd';
|
|
import { ArrowLeftOutlined } from '@ant-design/icons';
|
|
import MarkdownEditor from '@/components/Markdown/Editor';
|
|
|
|
import useInit from '@/hooks/useInit';
|
|
import { getPath } from '@/view/notes/config';
|
|
|
|
export default function Markdown() {
|
|
const [filePath, setFilePath] = useState('');
|
|
const location = useLocation();
|
|
const state = location?.state;
|
|
|
|
useInit(async () => {
|
|
setFilePath(await getPath(state));
|
|
})
|
|
|
|
return (
|
|
<>
|
|
<Breadcrumb separator=" ">
|
|
<Breadcrumb.Item href="">
|
|
<ArrowLeftOutlined />
|
|
</Breadcrumb.Item>
|
|
<Breadcrumb.Item href="">
|
|
{filePath}
|
|
</Breadcrumb.Item>
|
|
</Breadcrumb>
|
|
<MarkdownEditor />
|
|
</>
|
|
);
|
|
} |