Skip to content

Commit

Permalink
remove redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Lezette committed Dec 4, 2023
1 parent 4e33348 commit 38f6926
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import LandingPage from "./pages/Academy";

const queryClient = new QueryClient();

function App() {
function App () {
const { pathname } = useLocation();
React.useEffect(() => {
window.scrollTo(0, 0);
Expand All @@ -59,13 +59,12 @@ function App() {
);
}

function Routes(params) {
function Routes (params) {
return (
<Switch>
<Route path={paths.home} element={<Home />} />
<Route path="/academy/:slug" element={<AcademyPage />} />
<Route path="/academy" element={<LandingPage />} />
{/* <Route path="/academy" element={<Redirects />} /> */}
<Route path={paths.about} element={<About />} />
<Route path={paths.team} element={<Team />} />
<Route path={paths.chapters} element={<Chapters />} />
Expand Down
9 changes: 4 additions & 5 deletions src/pages/Academy/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useEffect, useState } from "react";
import Header from "../../components/Header";
import { Helmet } from "react-helmet-async";
import academyHero from "../../images/academy/academy.png";
import guidance from "../../images/about/guidance.jpg";
import { Link } from "react-router-dom";
import Footer from "../../components/Footer";
import { apiConstants, paths } from "../../utils";
Expand Down Expand Up @@ -74,12 +73,12 @@ const LandingPage = () => {

<section
id="mentor"
className="my-32 w-10/12 md:w-[75%] mx-auto grid grid-cols-1 md:grid-cols-2 gap-5 justify-between"
className="my-32 w-10/12 md:w-[75%] mx-auto grid grid-cols-1 md:grid-cols-2 lg:gap-16 gap-10 justify-between"
>
{schools.length > 0 &&
schools.map((school, index) => (
<article
className={`md:flex items-center justify-between my-40 `}
<div
className={`md:flex items-center justify-between`}
key={index}
>
<div className="md:w-[90%]">
Expand All @@ -100,7 +99,7 @@ const LandingPage = () => {
View school
</Link>
</div>
</article>
</div>
))}
</section>

Expand Down

0 comments on commit 38f6926

Please sign in to comment.