mirror of
https://github.com/morten-olsen/parcel.git
synced 2026-02-08 01:36:24 +01:00
chore: dependency updates (#448)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
Switch,
|
||||
Routes,
|
||||
Route,
|
||||
useHistory,
|
||||
useNavigate,
|
||||
} from 'react-router-dom';
|
||||
import { HomeFilled } from '@ant-design/icons';
|
||||
import { Layout, Button, Space } from 'antd';
|
||||
@@ -15,38 +15,26 @@ import Welcome from './screens/Welcome';
|
||||
import Debug from './screens/Debug';
|
||||
|
||||
const AppRouter: React.FC = () => {
|
||||
const history = useHistory();
|
||||
const navigate = useNavigate();
|
||||
return (
|
||||
<>
|
||||
<Space>
|
||||
<Button
|
||||
onClick={() => history.push('/')}
|
||||
onClick={() => navigate('/')}
|
||||
icon={<HomeFilled />}
|
||||
>
|
||||
Home
|
||||
</Button>
|
||||
</Space>
|
||||
<Layout.Content style={{ padding: '25px', maxWidth: '800px', width: '100%', margin: 'auto' }}>
|
||||
<Switch>
|
||||
<Route path="/debug">
|
||||
<Debug />
|
||||
</Route>
|
||||
<Route path="/welcome">
|
||||
<Welcome />
|
||||
</Route>
|
||||
<Route path="/key">
|
||||
<SetupKey />
|
||||
</Route>
|
||||
<Route path="/receive">
|
||||
<Decrypt />
|
||||
</Route>
|
||||
<Route path="/send">
|
||||
<Encrypt />
|
||||
</Route>
|
||||
<Route path="/">
|
||||
<Intro />
|
||||
</Route>
|
||||
</Switch>
|
||||
<Routes>
|
||||
<Route path="/debug" element={<Debug />} />
|
||||
<Route path="/welcome" element={<Welcome />} />
|
||||
<Route path="/key" element={<SetupKey />} />
|
||||
<Route path="/receive" element={<Decrypt />} />
|
||||
<Route path="/send" element={<Encrypt />} />
|
||||
<Route path="/" element={<Intro />} />
|
||||
</Routes>
|
||||
</Layout.Content>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user