AnoPaper/src/App.jsx

34 lines
961 B
React
Raw Normal View History

2022-10-17 13:50:40 +03:00
import "./App.css";
import { Routes, Route } from "react-router-dom";
import Menu from "./components/menu";
import CreateNote from "./pages/create";
function App() {
2022-10-18 18:32:25 +03:00
Storage.prototype.setObj = function (key, obj) {
return this.setItem(key, JSON.stringify(obj));
};
Storage.prototype.getObj = function (key) {
return JSON.parse(this.getItem(key));
};
2022-10-17 13:50:40 +03:00
return (
<div className="grid grid-cols-4 lg:grid-cols-5 gap-10 text-black dark:text-white">
<Menu />
<div className="col-span-4 p-5 m-4 rounded-2xl">
<Routes>
<Route path="/" element={<CreateNote />} />
<Route
path="/about"
element={<div className="col-span-4">О сервисе</div>}
/>
<Route
path="/notes"
element={<div className="col-span-4">Заметки со всего мира</div>}
/>
</Routes>
</div>
</div>
);
}
export default App;