Skip to content

Commit 3652043

Browse files
committed
Add auto redirect to /hero'
1 parent 62a74b2 commit 3652043

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/App.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ import Codeathon from "./views/Codeathon";
1919
import Login from "./views/Login";
2020
import Profile from "./views/Profile";
2121
import "./App.css"
22-
import { Routes, Route } from "react-router-dom";
22+
23+
24+
import { Routes, Route, Navigate } from "react-router-dom";
2325
import { CSSTransition, TransitionGroup } from "react-transition-group"
2426
import { useEffect } from "react";
2527

@@ -62,7 +64,7 @@ export default function App() {
6264
<CSSTransition key={location.key} classNames="fade" timeout={300}>
6365
<Routes>
6466
<Route path="/" element={<Main />}>
65-
<Route path="/" element={<Landing />}></Route>
67+
<Route path="/" element={<Navigate to="/hero" />}></Route>
6668
<Route path="/profile" element={ <Profile /> }></Route>
6769
<Route path="/new" element={<New />}></Route>
6870
{/* <Route path="/core" element={<CoreTeam />}></Route> */}

src/pages/Main.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ export default function Main() {
5050
</Link>
5151
</div>
5252
<div className="menuLink hideOnMobile">
53-
<Link className="noStyle" to="/events/algo2024">
54-
Algorithmist2024
53+
<Link className="noStyle" to="/events/prajnotsavah">
54+
Prajnotsavah
5555
</Link>
5656
</div>
5757
<div className="menuLink hideOnMobile">
@@ -113,7 +113,7 @@ export default function Main() {
113113
<Link to="/members">Members</Link>
114114
</span>
115115
<span>
116-
<Link to="/events/algo2024">Algorithmist2024</Link>
116+
<Link to="/events/prajnotsavah">Prajnotsavah 2K24</Link>
117117
</span>
118118
{/* <span>Contact</span> */}
119119
{/* <span>

src/views/Home.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ export default function Main() {
4242
const navigate = useNavigate();
4343

4444
useEffect(() => {
45+
46+
navigate("/hero");
47+
return;
48+
4549
createAndSetNewSlideInterval();
4650

4751
const introObserver = new IntersectionObserver((entries) => {

0 commit comments

Comments
 (0)