Skip to content

Commit a36619e

Browse files
committed
remove unused import
1 parent 2c5c4e3 commit a36619e

File tree

2 files changed

+17
-32
lines changed

2 files changed

+17
-32
lines changed

src/components/LayoutApp.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,15 @@ export default function LayoutApp ( props: {
185185

186186
const handleHatClick = () => {
187187
// navigate( Notepad );
188-
const notepad_route_ctx ={
189-
key: '1', // to prevent error in useEffect
188+
const notepad_route_ctx = {
189+
key: '1', // to prevent error in useEffect
190190
name: 'Hat Clicked',
191191
componentRoute: Notepad
192192
}
193193

194194
navigate( notepad_route_ctx );
195195
};
196-
196+
197197
return (
198198
<ConfigProvider
199199
theme={{

src/components/notepad/Notepad.tsx

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,23 @@
1-
import React, { useState } from 'react';
2-
import { Button, Input, Typography, message, Divider, Menu, Dropdown } from 'antd';
3-
import { CopyOutlined, createFromIconfontCN, ClearOutlined, DownOutlined } from '@ant-design/icons';
4-
import Clipboard from 'react-clipboard.js';
5-
import escape_quotes from 'escape-quotes';
1+
import React from 'react';
62
import MDEditor from '@uiw/react-md-editor';
7-
const { Title, Paragraph } = Typography;
83
import PersistedState from 'use-persisted-state';
9-
import mermaid from "mermaid";
10-
const IconFont = createFromIconfontCN( {
11-
scriptUrl: [ './iconfont.js' ]
12-
} );
134

145

156
const NOTEPAD = () => {
16-
const [value, setValue] = PersistedState<string|string>('notepad')('');
17-
return (
18-
<>
19-
<Paragraph>
20-
21-
</Paragraph>
22-
<div className="container">
23-
<MDEditor
24-
textareaProps={{
25-
placeholder: 'This is an offline markdown editor to help you take some small notes (data is kept in your browser localstorage)'
26-
}}
27-
value={value || ''}
28-
onChange={setValue}
29-
height={520}
30-
/>
31-
{/* <MDEditor.Markdown source={value} /> */}
32-
</div>
33-
</>
7+
const [ value, setValue ] = PersistedState<string | string>( 'notepad' )( '' );
8+
return (
9+
<div className='container'>
10+
<MDEditor
11+
textareaProps={{
12+
placeholder: 'This is an offline markdown editor to help you take some small notes (data is kept in your browser localstorage)'
13+
}}
14+
value={value || ''}
15+
onChange={setValue}
16+
height={500}
17+
/>
18+
</div>
3419
);
35-
20+
3621
};
3722

3823
export default NOTEPAD;

0 commit comments

Comments
 (0)