fix: Removed last couple instances of window.location
This commit is contained in:
parent
5c71cc6b17
commit
b0e46a5ed6
@ -191,9 +191,7 @@ const Home: Component = () => {
|
||||
<Button
|
||||
backgroundColor='red'
|
||||
onClick={() => {
|
||||
RestClient.DELETE(`/todo/${todo.id}`).then(
|
||||
() => (window.location.href = '/')
|
||||
);
|
||||
RestClient.DELETE(`/todo/${todo.id}`).then(() => fetchTodos());
|
||||
}}
|
||||
>
|
||||
🗑
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { useNavigate } from '@solidjs/router';
|
||||
import { A, useNavigate } from '@solidjs/router';
|
||||
import { Component, Show } from 'solid-js';
|
||||
import RestClient from '../api/RestClient';
|
||||
import { user, setUser } from '../App';
|
||||
@ -9,12 +9,12 @@ const Navbar: Component = () => {
|
||||
return (
|
||||
<div class='flex justify-between items-center bg-sh-bg p-3'>
|
||||
<div class='flex items-center'>
|
||||
<a
|
||||
<A
|
||||
href='/'
|
||||
class='pl-2 text-xl font-bold no-underline text-sh-yellow hover:text-sh-yellowM1'
|
||||
>
|
||||
Just todo it!
|
||||
</a>
|
||||
</A>
|
||||
</div>
|
||||
<h1 class='flex -ml-20 text-xl font-bold no-underline text-sh-yellow'>
|
||||
Hey {user().login}!
|
||||
@ -33,7 +33,7 @@ const Navbar: Component = () => {
|
||||
onClick={() => {
|
||||
RestClient.DELETE('/logout');
|
||||
setUser({ id: '', login: '' });
|
||||
('/login');
|
||||
nav('/login');
|
||||
}}
|
||||
backgroundColor='magenta'
|
||||
color='black'
|
||||
|
Loading…
x
Reference in New Issue
Block a user