mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
chore: path
This commit is contained in:
32
src/view/markdown/index.tsx
vendored
Normal file
32
src/view/markdown/index.tsx
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
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 />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user