forked from AkkilMG/PicDB-UI-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
35 lines (29 loc) · 1.01 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* (c) 2022-2023 PicDB | Akkil M G
* @author: Akkil M G (https://github.com/HeimanPictures)
* @license: GNU General Public License v3.0
**/
import React from 'react';
import {Routes, Route } from 'react-router-dom';
import { inject } from '@vercel/analytics';
import './css/style.css';
import Home from './pages/Home';
import Header from './pages/component/Header';
function App() {
// const location = useLocation();
// useEffect(() => {
// document.querySelector('html').style.scrollBehavior = 'auto'
// window.scroll({ top: 0 })
// document.querySelector('html').style.scrollBehavior = ''
// }, [location.pathname]); // triggered on route change
inject();
return (
<div className="flex flex-col w-full min-h-screen bg-fixed bg-no-repeat bg-cover backdrop-blur-sm" id="journal-scroll" style={{backgroundImage: `url(${require("./asset/home.jpg")})`}}>
<Header />
<Routes>
<Route exact path="/" element={<Home />} />
</Routes>
</div>
);
}
export default App;