Skip to content

Commit 68e84cf

Browse files
authored
Merge pull request #167 from Code-4-Community/155-dev---create-sidebar-with-filtering-features
155 dev create sidebar with filtering features
2 parents 0d72d95 + 1d98fd2 commit 68e84cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+451
-433
lines changed

frontend/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
* App.tsx
33
* Renders with <AnimatedRoutes />.
44
*/
5-
import "./App.css";
5+
import "./styles/App.css";
66
import { ChakraProvider, defaultSystem } from "@chakra-ui/react";
77
import { BrowserRouter as Router } from "react-router-dom";
88
import { observer } from "mobx-react-lite";
99

1010
// Register store and mutators
1111
import "./external/bcanSatchel/mutators";
1212
import AnimatedRoutes from "./animations/AnimatedRoutes";
13-
import Footer from "./grant-info/components/Footer";
13+
import Footer from "./main-page/Footer";
1414

1515
/**
1616
* Main app component that renders animated routes

frontend/src/Header.tsx

Lines changed: 0 additions & 102 deletions
This file was deleted.

frontend/src/Profile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const Profile = observer(() => {
9696
<button type="submit" style={styles.button}>
9797
Save Changes
9898
</button>
99-
<Link to="/grant-info" style={{ textDecoration: "none" }}>
99+
<Link to="/main" style={{ textDecoration: "none" }}>
100100
<button style={styles.button}>Home</button>
101101
</Link>
102102
</div>

frontend/src/animations/AnimatedRoutes.tsx

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Routes, Route, useLocation, Navigate } from "react-router-dom";
2-
import { TransitionGroup, CSSTransition } from "react-transition-group";
2+
// import { TransitionGroup, CSSTransition } from "react-transition-group";
33

44
// static transitions sheet
55
import "./transitions.css";
66

77
import { observer } from "mobx-react-lite";
88
import Account from "../Account";
99
import { useAuthContext } from "../context/auth/authContext";
10-
import GrantPage from "../grant-info/components/GrantPage";
10+
import MainPage from "../main-page/MainPage";
1111
import Login from "../Login";
1212
import Register from "../Register";
1313

@@ -21,16 +21,7 @@ const AnimatedRoutes = observer(() => {
2121
const { isAuthenticated } = useAuthContext();
2222

2323
return (
24-
<TransitionGroup component={null}>
25-
{/*
26-
key the transition by location.key
27-
so each route triggers an enter/exit animation
28-
*/}
29-
<CSSTransition key={location.key} timeout={800} classNames="fade">
30-
{/*
31-
Pass `location` to <Routes> to let RTG track route changes
32-
*/}
33-
<Routes location={location}>
24+
<Routes location={location}>
3425
<Route
3526
path="/login"
3627
element={isAuthenticated ? <Navigate to="/account" /> : <Login />}
@@ -40,21 +31,19 @@ const AnimatedRoutes = observer(() => {
4031
element={
4132
isAuthenticated ? <Navigate to="/account" /> : <Register />
4233
}
43-
/>
34+
/>
4435
<Route
4536
path="/account"
4637
element={isAuthenticated ? <Account /> : <Navigate to="/login" />}
4738
/>
48-
<Route path="/grant-info" element={<GrantPage />} />
39+
<Route path="/main/*" element={<MainPage/>} />
4940
<Route
5041
path="*"
5142
element={
5243
<Navigate to={isAuthenticated ? "/account" : "/login"} />
5344
}
5445
/>
5546
</Routes>
56-
</CSSTransition>
57-
</TransitionGroup>
5847
);
5948
});
6049

frontend/src/grant-info/components/GrantPage.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

frontend/src/grant-info/components/GrantSearch.tsx

Lines changed: 0 additions & 133 deletions
This file was deleted.

frontend/src/grant-info/components/LinkButton.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

frontend/src/grant-info/components/Footer.tsx renamed to frontend/src/main-page/Footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
2-
import './styles/Footer.css'
2+
import '../styles/Footer.css'
33
import { Group, Text } from '@chakra-ui/react';
4-
import { FooterText } from '../../translations/general';
4+
import { FooterText } from '../translations/general';
55

66
const Footer: React.FC = () => {
77
return (

0 commit comments

Comments
 (0)