fix: now the save link is not saved in the history

This commit is contained in:
Artemy 2022-10-20 21:49:05 +03:00
parent 5d3c274a81
commit fda90ed0bd
3 changed files with 2 additions and 5 deletions

View file

@ -15,8 +15,6 @@ function Note() {
}, []);
if (note) {
console.log(note);
return (
<div className="">
<Button className="mb-4" href="/notes">

View file

@ -10,7 +10,6 @@ function Notes() {
return b[1].time - a[1].time;
})
.map((val) => {
console.log(val[1]);
return (
<div className="grid grid-cols-1 lg:grid-cols-2 border border-blue-300 rounded-lg m-2 p-2 justify-items-start">
<div className="font-medium leading-tight text-4xl mt-0 mb-2">

View file

@ -1,4 +1,4 @@
import { useState, useEffect } from "react";
import { useEffect } from "react";
import { useNavigate } from "react-router-dom";
import NotePlaceholder from "../components/notePlaceholder";
@ -33,7 +33,7 @@ function Save() {
localStorage.removeItem("NoteName");
localStorage.removeItem("NoteText");
navigate(`/notes/${id}`);
navigate(`/notes/${id}`, { replace: true });
}
}, []);