Fix nav issue
This commit is contained in:
parent
70fd59a4be
commit
01589eedeb
3 changed files with 5 additions and 6 deletions
|
|
@ -81,12 +81,11 @@ def index():
|
||||||
print('Redirect to dashboard')
|
print('Redirect to dashboard')
|
||||||
return redirect('/dashboard/')
|
return redirect('/dashboard/')
|
||||||
|
|
||||||
@app.route('/profile/', defaults={'path': ''})
|
@app.route('/dashboard/')
|
||||||
@app.route('/dashboard/', defaults={'path': ''})
|
@app.route('/profile/')
|
||||||
@app.route('/orders/<path:path>')
|
@app.route('/orders/<path:path>')
|
||||||
@app.route('/dashboard/<path:path>')
|
|
||||||
@login_required
|
@login_required
|
||||||
def dashboard(path):
|
def dashboard(path=''):
|
||||||
return render_template('dashboard.html')
|
return render_template('dashboard.html')
|
||||||
|
|
||||||
@app.route('/logout')
|
@app.route('/logout')
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export const Header: React.FC = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handleClick = React.useCallback(() => {
|
const handleClick = React.useCallback(() => {
|
||||||
navigate("/profile");
|
navigate("/profile/");
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ export const Profile: React.FC = () => {
|
||||||
<Title>{username}</Title>
|
<Title>{username}</Title>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Box mb="md">
|
<Box mb="md">
|
||||||
<Link to={`/dashboard`}>Return to dashboard</Link>
|
<Link to={`/dashboard/`}>Return to dashboard</Link>
|
||||||
</Box>
|
</Box>
|
||||||
<Paper bg="gray.1">
|
<Paper bg="gray.1">
|
||||||
<Title order={4}>Mastodon</Title>
|
<Title order={4}>Mastodon</Title>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue