-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
41 lines (35 loc) · 1.31 KB
/
App.tsx
File metadata and controls
41 lines (35 loc) · 1.31 KB
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
36
37
38
39
40
41
import { Routes, Route, Link, useLocation } from 'react-router';
import Signup from './pages/Signup';
import Preferences from './pages/Preferences';
import Home from './pages/home/Home';
import Explore from './pages/Explore';
import Chat from './pages/Chat';
import { Starfield } from './components/Starfield';
import { RocketTransition } from './components/RocketTransition';
function App() {
const location = useLocation();
const isHomePage = location.pathname === '/';
return (
<div className="app-container">
<Starfield />
{!isHomePage && (
<div style={{ position: 'absolute', top: '24px', left: '32px', zIndex: 100 }}>
<Link to="/" style={{ display: 'inline-block' }}>
<img src={`${import.meta.env.BASE_URL}SSTRUK-logo.png?v=5`} alt="SSTRUK Logo" style={{ height: '80px', objectFit: 'contain' }} />
</Link>
</div>
)}
<main className="main-content">
<Routes>
<Route path="/" element={<Home />} />
<Route path="/signup" element={<Signup />} />
<Route path="/preferences" element={<Preferences />} />
<Route path="/explore" element={<Explore />} />
<Route path="/chat/:id" element={<Chat />} />
</Routes>
</main>
<RocketTransition />
</div>
);
}
export default App;