Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nirmal MVP Finalization #52

Open
wants to merge 191 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
4813db2
Add frontend auth files
vs2961 Jan 28, 2023
ba60fa2
Login, signup setup
Anthonyp0329 Jan 28, 2023
cc227a5
Merge branch 'main' into Feature/vs2961/backend-auth
Anthonyp0329 Jan 28, 2023
679e548
SignUp Changes
Anthonyp0329 Jan 28, 2023
b57a2e3
Write user creation functions
vs2961 Jan 31, 2023
8333807
Styling for Signup page
aammya8 Jan 31, 2023
3b3c1e6
Merge branch 'Feature/vs2961/backend-auth' of https://github.com/Trit…
aammya8 Jan 31, 2023
c230f3b
Setting up backend calls
Anthonyp0329 Feb 1, 2023
6e45e14
Merge branch 'Feature/vs2961/backend-auth' of https://github.com/Trit…
Anthonyp0329 Feb 1, 2023
8209d55
registerUser
Anthonyp0329 Feb 1, 2023
9948f18
Add create user endpoint
vs2961 Feb 5, 2023
f65eb60
SignUpPage error handling + confirm password field
Anthonyp0329 Feb 7, 2023
12dcbdd
LogIn page error handling
Anthonyp0329 Feb 7, 2023
aa12461
Setup Signup With Google
aammya8 Feb 8, 2023
c053222
Cleaned up styling
aammya8 Feb 8, 2023
c68136c
Squashed commit of the following:
Anthonyp0329 Feb 9, 2023
1ea5024
Merge branch 'main' into Feature/vs2961/backend-auth
Anthonyp0329 Feb 13, 2023
733597a
SignUp Page styling
Anthonyp0329 Feb 14, 2023
f85b63d
changing around error display
Anthonyp0329 Feb 14, 2023
9a9d114
Update signup.css
Anthonyp0329 Feb 14, 2023
8516682
Update signup.css
Anthonyp0329 Feb 15, 2023
9cf9742
Merge branch 'main' into Feature/vs2961/backend-auth
Anthonyp0329 Feb 18, 2023
86809c3
getting login, signup page routing wroking
Anthonyp0329 Feb 18, 2023
67ab3a9
Update package.json
vs2961 Feb 18, 2023
daf80c2
Update index.js
Anthonyp0329 Feb 19, 2023
0343f53
Update SignUpPage.tsx
Anthonyp0329 Feb 19, 2023
ee69b68
Login page css
Anthonyp0329 Feb 20, 2023
cc129c8
SignUp page error handling
Anthonyp0329 Feb 21, 2023
6fde352
LogIn Page error messages
Anthonyp0329 Feb 21, 2023
32ed471
login page updates
Anthonyp0329 Feb 21, 2023
2c30f7a
changing class names
Anthonyp0329 Feb 21, 2023
6c01cd9
Merge branch 'main' into Feature/vs2961/backend-auth
Anthonyp0329 Feb 21, 2023
780aaea
changed signup button to look clickable
Anthonyp0329 Feb 21, 2023
cb8aedc
Initial code for linking accounts
aammya8 Feb 22, 2023
d37c8e1
Update auth.css
Anthonyp0329 Feb 22, 2023
5731380
Redirect to Landing Page after Google Login
aammya8 Feb 22, 2023
9ff9e84
Improved Google Sign In Button CSS
aammya8 Feb 22, 2023
a583d3c
Changed Google Button CSS
aammya8 Feb 22, 2023
59ef56a
Fixed Google Button Styling
aammya8 Feb 22, 2023
5cc30ab
arrow functions
Anthonyp0329 Feb 22, 2023
741bf07
google button css
Anthonyp0329 Feb 22, 2023
bc562b4
Merge branch 'main' into Feature/vs2961/backend-auth
vs2961 Feb 25, 2023
d7101ed
Fixed error handling, played around with css
Anthonyp0329 Feb 28, 2023
477e183
Redux state and reset password
Anthonyp0329 Feb 28, 2023
73198df
password reset improvements
Anthonyp0329 Feb 28, 2023
614dbdd
renaming conventions
Anthonyp0329 Mar 1, 2023
f7821f7
Merge branch 'main' into Feature/vs2961/backend-auth
Anthonyp0329 Mar 1, 2023
5f7f5db
Prettier and lint fixes
NirmalAgnihotri Mar 3, 2023
4b10b39
Linted and formatted backend files
NirmalAgnihotri Mar 3, 2023
021cf72
Updated git and eslint ignore
NirmalAgnihotri Mar 3, 2023
4c13982
lint fixes
NirmalAgnihotri Mar 3, 2023
b364a57
fixed backend linting errors
NirmalAgnihotri Mar 3, 2023
757cc03
Linting Fixes
Anthonyp0329 Mar 4, 2023
cc42d62
Update auth.css
Anthonyp0329 Mar 4, 2023
b6c988f
lint cache in gitignore
NirmalAgnihotri Mar 4, 2023
3438445
Remember me working
Anthonyp0329 Mar 5, 2023
9f7823a
Google button css
Anthonyp0329 Mar 5, 2023
5f227d8
fixing linter issues
Anthonyp0329 Mar 7, 2023
8c6e740
Update auth-errors.tsx
Anthonyp0329 Mar 7, 2023
9386b0b
Update .eslintrc.json
Anthonyp0329 Mar 8, 2023
785877d
Password reset flow - styling needs change
Anthonyp0329 Mar 8, 2023
0f8a55c
fixing linting errors
aammya8 Mar 8, 2023
6d19fdd
Merge branch 'Feature/vs2961/backend-auth' of https://github.com/Trit…
aammya8 Mar 8, 2023
824cad7
fixing remember me, registering user isseus
Anthonyp0329 Mar 8, 2023
06bf057
Update SignUpPage.tsx
Anthonyp0329 Mar 8, 2023
43ad844
fixing linter errors
aammya8 Mar 8, 2023
40a3387
Merge branch 'main' into auth-finalization
Anthonyp0329 Mar 8, 2023
a09760a
Merge branch 'main' into auth-finalization
Anthonyp0329 Mar 13, 2023
f1b539e
modal changes/sign up fixes
Anthonyp0329 Mar 14, 2023
c47b96c
Refactor users
vs2961 Mar 14, 2023
44d8572
Merge branch 'main' into auth-finalization
Anthonyp0329 Mar 14, 2023
e731578
Merge branch 'Feature/vs2961/backend-auth' into auth-finalization
Anthonyp0329 Mar 14, 2023
a088144
updating branch
Anthonyp0329 Mar 14, 2023
09e0ee1
Fix errors
vs2961 Mar 14, 2023
5ca0797
Merge branch 'auth-finalization' of github.com:TritonSE/SDCTA-Data-Vi…
vs2961 Mar 14, 2023
94919d0
reset password changes and backend fix
Anthonyp0329 Mar 14, 2023
a48c39a
Reset password flow done
Anthonyp0329 Mar 14, 2023
f8e2bc4
reset password done
Anthonyp0329 Mar 14, 2023
5651289
updates
emmaz12 Apr 12, 2023
ab32146
Fixed styling issues for Profile Info section
hpai1 Apr 12, 2023
c0e9f5c
constants
emmaz12 Apr 12, 2023
ab2e38f
profile information
emmaz12 Apr 12, 2023
538acf5
extra sign up details page
Anthonyp0329 Apr 13, 2023
47a782f
Update auth.css
Anthonyp0329 Apr 13, 2023
e3b82f9
adding backend functionality for details update
Anthonyp0329 Apr 14, 2023
b319e47
Finished styling the profile and payment info columns
hpai1 Apr 14, 2023
9b48c42
update
emmaz12 Apr 14, 2023
8042129
save/cancel button styling
emmaz12 Apr 15, 2023
3b73b04
merge with main
emmaz12 Apr 17, 2023
a22d8e0
backend changes
Anthonyp0329 Apr 17, 2023
a3d1836
Merge remote-tracking branch 'origin' into Feature/emmaz12_hpai1/user…
emmaz12 Apr 21, 2023
4e0e003
Merge branch 'main' into auth-finalization
Anthonyp0329 Apr 23, 2023
c803adf
getting sagas calls working
Anthonyp0329 Apr 23, 2023
194eb89
Create authSaga.ts
aammya8 Apr 23, 2023
e2e74f3
membership-map updates
emmaz12 Apr 28, 2023
3af8985
page color update
emmaz12 Apr 28, 2023
bda006b
Add user update function
vs2961 Apr 30, 2023
3b0411f
Added the visual at the bottom and fixed basic styling. Also added th…
hpai1 Apr 30, 2023
ce70c9b
fixed alignment for benefits dropdown
emmaz12 Apr 30, 2023
91ca85a
Made a new file for the payment edit page and tried adding the profil…
hpai1 Apr 30, 2023
7a7a90f
consumer.ts changes
Anthonyp0329 Apr 30, 2023
cf3d147
Allow adding other fields to user
vs2961 Apr 30, 2023
d348e4e
details calls working, details page css
Anthonyp0329 May 1, 2023
479736c
Update user.js
Anthonyp0329 May 1, 2023
4c957bf
prettier
Anthonyp0329 May 1, 2023
6f58340
Fix tier update
vs2961 May 1, 2023
d0b985c
Merge branch 'main' into auth-finalization
Anthonyp0329 May 1, 2023
aef7b20
Edit/Save button
emmaz12 May 8, 2023
3208aec
Sagas! login user saga done
Anthonyp0329 May 8, 2023
7d47e7f
Styled the home profile page. Added functionality to hide the passwor…
hpai1 May 8, 2023
2923cf4
removed payment section
emmaz12 May 8, 2023
ec712cb
Update loginSlice.tsx
Anthonyp0329 May 8, 2023
a993e54
storing user in redux state
Anthonyp0329 May 8, 2023
70aa360
Merge branch 'Feature/anthonyp0329/userredux' into auth-finalization
Anthonyp0329 May 8, 2023
8ba332a
Update LogInPage.tsx
Anthonyp0329 May 8, 2023
a953903
storing user in redux state
Anthonyp0329 May 10, 2023
9dd028b
Link Button
aammya8 May 10, 2023
ec83abb
error handling
Anthonyp0329 May 10, 2023
5afe9df
Merge branch 'auth-finalization' of https://github.com/TritonSE/SDCTA…
Anthonyp0329 May 10, 2023
976606d
Signup and Login with Google Sagas
aammya8 May 10, 2023
14ff357
Merge branch 'auth-finalization' of https://github.com/TritonSE/SDCTA…
aammya8 May 10, 2023
02aed31
changing register to sagas
Anthonyp0329 May 11, 2023
0acbf92
Merge branch 'auth-finalization' of https://github.com/TritonSE/SDCTA…
Anthonyp0329 May 11, 2023
aae1699
merging
Anthonyp0329 May 11, 2023
da36a34
Update auth.ts
Anthonyp0329 May 11, 2023
e0b055f
Update auth.ts
Anthonyp0329 May 11, 2023
9e8ce6b
Remove dispatch from auth.ts
aammya8 May 11, 2023
5787e4a
Merge branch 'auth-finalization' of https://github.com/TritonSE/SDCTA…
aammya8 May 11, 2023
60ecf98
fixing navigate issues
Anthonyp0329 May 11, 2023
45953e9
Fix navigation issues
aammya8 May 11, 2023
d99e779
Update authSaga.ts
Anthonyp0329 May 11, 2023
0990bef
Merge branch 'auth-finalization' of https://github.com/TritonSE/SDCTA…
Anthonyp0329 May 11, 2023
98cffd4
Update auth.ts
Anthonyp0329 May 11, 2023
99b0c9e
fixing loginwithgoogle
Anthonyp0329 May 11, 2023
66abe06
Update auth.ts
aammya8 May 12, 2023
8a7a4d2
updates
emmaz12 Apr 12, 2023
c7527a6
Fixed styling issues for Profile Info section
hpai1 Apr 12, 2023
9377aad
constants
emmaz12 Apr 12, 2023
c7efde1
profile information
emmaz12 Apr 12, 2023
52e00d1
Finished styling the profile and payment info columns
hpai1 Apr 14, 2023
54f4d88
update
emmaz12 Apr 14, 2023
392161e
save/cancel button styling
emmaz12 Apr 15, 2023
a471b2e
membership-map updates
emmaz12 Apr 28, 2023
3f4ffb3
page color update
emmaz12 Apr 28, 2023
0fd5928
Added the visual at the bottom and fixed basic styling. Also added th…
hpai1 Apr 30, 2023
cd18d1e
fixed alignment for benefits dropdown
emmaz12 Apr 30, 2023
7ae89f9
Made a new file for the payment edit page and tried adding the profil…
hpai1 Apr 30, 2023
1520628
Edit/Save button
emmaz12 May 8, 2023
ef3dbe2
Styled the home profile page. Added functionality to hide the passwor…
hpai1 May 8, 2023
28f885d
removed payment section
emmaz12 May 8, 2023
1acf150
Update Profile.tsx
emmaz12 May 13, 2023
03581f5
Merge branch 'Feature/emmaz12_hpai1/userProfileFrontend' of https://g…
emmaz12 May 13, 2023
ab5dbda
Update Profile.tsx
emmaz12 May 13, 2023
d8a8259
Update App.tsx
Anthonyp0329 May 15, 2023
692af1f
bug fixing for google login
Anthonyp0329 May 16, 2023
23dfae1
Merge branch 'Feature/anthonyp0329/userredux' into Feature/emmaz12_hp…
hpai1 May 21, 2023
08f3e63
Added the user field so we can pull info. Ex. user?.country. Also add…
hpai1 May 21, 2023
af19f5b
log in with google error fixes
Anthonyp0329 May 30, 2023
812d236
error fixes
Anthonyp0329 May 30, 2023
097dda1
user bug fixes
Anthonyp0329 May 30, 2023
b50af1a
removing logs
Anthonyp0329 May 31, 2023
6624424
Merge branch 'main' into Feature/emmaz12_hpai1/userProfileFrontend
emmaz12 Jun 3, 2023
c43eacb
pulling user data from backend
emmaz12 Jun 5, 2023
b8b7055
Merge branch 'main' into auth-finalization
Anthonyp0329 Jun 5, 2023
f55455f
last name first name handling
Anthonyp0329 Jun 5, 2023
a1b0433
auth bug fixes/finalization
Anthonyp0329 Jun 5, 2023
0569066
Update package-lock.json
Anthonyp0329 Jun 5, 2023
33a4835
Update package-lock.json
Anthonyp0329 Jun 5, 2023
a92f41d
Update .eslintrc.json
Anthonyp0329 Jun 5, 2023
baf5c96
Update DetailsPage.tsx
Anthonyp0329 Jun 5, 2023
a287758
Update authSaga.ts
Anthonyp0329 Jun 5, 2023
1c7dc49
Fix code style
vs2961 Jun 6, 2023
7f7562d
Fix npm ci error
vs2961 Jun 6, 2023
542a810
Merge branch 'main' into auth-finalization
NirmalAgnihotri Jun 14, 2023
1ff570a
added back dispatch var
NirmalAgnihotri Jun 14, 2023
0ea9c3b
implemented saga
NirmalAgnihotri Jun 14, 2023
ed34597
removed logs, finished saga
NirmalAgnihotri Jun 14, 2023
90c95c9
Merge remote-tracking branch 'origin/Feature/emmaz12_hpai1/userProfil…
NirmalAgnihotri Jun 14, 2023
775acb7
edit button fix
NirmalAgnihotri Jun 14, 2023
cf1f13d
Hooked up category and individual viz pages
NirmalAgnihotri Jun 15, 2023
7e14a74
Merge branch 'auth-finalization' into Nirmal-MVP-Finalization
NirmalAgnihotri Jun 15, 2023
bc2114e
Disabled edit button on user profile
NirmalAgnihotri Jun 15, 2023
4158633
Implemented user profile editing
NirmalAgnihotri Jun 16, 2023
dea7ca8
Added intro text
NirmalAgnihotri Jun 16, 2023
d7c114d
Merge branch 'main' into Nirmal-MVP-Finalization
NirmalAgnihotri Jun 16, 2023
5f35fc5
fixed bad merge conflict resolution
NirmalAgnihotri Jun 16, 2023
1c3f079
Fixed frontend linting issues
NirmalAgnihotri Jun 16, 2023
d06ea1d
fixed backend linting
NirmalAgnihotri Jun 16, 2023
cc29010
prettier frontend formatting
NirmalAgnihotri Jun 16, 2023
ba8f05a
removed country dropdown dependency
NirmalAgnihotri Jun 16, 2023
fa3efda
prettier run
NirmalAgnihotri Jun 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17,447 changes: 17,386 additions & 61 deletions SDCTA/package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion SDCTA/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"firebase": "^9.16.0",
"react": "^18.2.0",
"react-bootstrap": "^2.7.0",
"react-country-dropdown": "^1.1.0",
"react-country-region-selector": "^3.6.1",
"react-dom": "^18.2.0",
"react-icons": "^4.7.1",
Expand Down
Binary file added SDCTA/public/Images/DefaultProfilePic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SDCTA/public/Images/Edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SDCTA/public/Images/membership-status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions SDCTA/src/api/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { UserCredential } from "firebase/auth";
import { type User } from "./data";
import {
signInWithEmailAndPassword,
setPersistence,
Expand Down Expand Up @@ -114,7 +115,7 @@ const loginUser = async (
}
};

const getUser = async (email: any): Promise<any> => {
const getUser = async (email: string): Promise<User | null> => {
const requestOptions = {
method: "GET",
headers: { "Content-Type": "application/json" },
Expand All @@ -125,7 +126,7 @@ const getUser = async (email: any): Promise<any> => {
if (response.status === 404) {
return null;
}
return await response.json();
return (await response.json()) as User;
};

const provider = new GoogleAuthProvider();
Expand Down
53 changes: 27 additions & 26 deletions SDCTA/src/api/consumer.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { type VisualizationObject } from "./data";
import { useDispatch } from "react-redux";

export const API_URL = process.env.REACT_APP_API_URL;
export const GET_VIS = `${API_URL ?? "http://localhost:3001"}/visualization`;
import { type Visualization, type Category, type UserDetails } from "./data";
export const API_URL = process.env.REACT_APP_API_URL ?? "";
export const GET_VIS = `${API_URL}/visualization`;
export const CATEGORY_PREFIX = `${API_URL}/category`;
export const USER_PREFIX = `${API_URL}/user`;

export const getVisByTitle = async (
title: string
): Promise<VisualizationObject | null> => {
): Promise<Visualization | null> => {
try {
const url = `${GET_VIS}/${encodeURIComponent(title)}`;
const response = await fetch(url);
if (!response.ok) {
throw new Error(`${response.status} Failed Fetch `);
}
let data = await response.json();
data = data as VisualizationObject;
data = data as Visualization;
return data;
} catch (err) {
console.error("Exception", err);
Expand Down Expand Up @@ -42,39 +42,40 @@ export const getCsvByTitle = async (title: string): Promise<void> => {
}
};

interface userDetails {
phone?: string;
address?: string;
city?: string;
state?: string;
zipCode?: string;
country?: string;
}

const updateUserDetails = async (
emailIn: string,
userDetails: userDetails
userDetails: UserDetails
): Promise<Response> => {
const updateRequestOptions = {
method: "PATCH",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(userDetails),
};

const requestLink = "http://localhost:3001/user/";

const response = await fetch(
requestLink.concat(emailIn),
`${USER_PREFIX}/${emailIn}`,
updateRequestOptions
);
const dispatch = useDispatch();
// const dispatch = useDispatch();

dispatch({
type: "STORE_USER",
payload: emailIn,
});
// dispatch({
// type: "STORE_USER",
// payload: emailIn,
// });

return response;
};

export const getCategoryByName = async (
categoryName: string
): Promise<Category | null> => {
try {
const url = `${CATEGORY_PREFIX}/${categoryName}`;
const response = await fetch(url);
const data = await response.json();
return data as Category;
} catch {
return null;
}
};

export { updateUserDetails };
30 changes: 29 additions & 1 deletion SDCTA/src/api/data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
export interface VisualizationObject {
export interface Visualization {
title: string;
analysis: string;
link: string;
hasCSV: boolean;
}

export interface Category {
_id: string;
name: string;
visualizations: Visualization[];
}

export interface User {
firstName?: string;
lastName?: string;
email: string;
compName?: string;
phone?: string;
address?: string;
city?: string;
state?: string;
zipCode?: string;
country?: string;
}

export interface UserDetails {
phone?: string;
address?: string;
city?: string;
state?: string;
zipCode?: string;
country?: string;
}
5 changes: 4 additions & 1 deletion SDCTA/src/app/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
import loginReducer from "../slices/loginSlice";
import subscribeReducer from "../slices/subscribeSlice";
import createSagaMiddleware from "redux-saga";
import categoryReducer from "../slices/categorySlice";
import rootSaga from "../sagas/rootSaga";
import registerSaga from "../sagas/authSaga";

// Create the saga middleware
Expand All @@ -16,14 +18,15 @@ export const store = configureStore({
reducer: {
login: loginReducer,
subscribe: subscribeReducer,
category: categoryReducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(middleware),
});

// Then run the saga
// uncomment when root saga is made
sagaMiddleware.run(registerSaga);
sagaMiddleware.run(rootSaga);

export type AppDispatch = typeof store.dispatch;
export type RootState = ReturnType<typeof store.getState>;
Expand Down
6 changes: 0 additions & 6 deletions SDCTA/src/components/ErrorBoundary.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
/* This file is .jsx instead of .tsx because of the use of class. This is used only when
TableauEmbed gets an invalid URL and crashes but should likely not happen because
URLs that we use and get are from our backend which would be already verified. */
}

import React from "react";
import { Error404 } from "../components/404";

Expand Down
42 changes: 34 additions & 8 deletions SDCTA/src/components/Landing_Page/Body.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
import "./body.css";
import { useNavigate } from "react-router-dom";

const landscape = "./Images/Landing_Image.jpg";
const EducationVis = "./Images/Education_Standin.png";
const HomelessnessVis = "./Images/Homelessness_Standin.png";
const MunicipalVis = "./Images/Municipal_Standin.png";

export const Body: React.FC = () => {
const navigate = useNavigate();
return (
<>
<div>
<div className="heading">SDTEF Data Museum</div>
<div className="description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
Welcome to the San Diego Taxpayers Educational Foundation data museum!
This is SDTEF&apos;s repository for data on all things local public
administration. Here you&apos;ll find a comprehensive quantitative
picture of funding for important local public goods, such as
homelessness services and education! Each data exhibit includes
details on the appropriate uses and limitations of the data. If you
have any questions about our data, you can contact us at
[email protected].
</div>
<div className="imgbox">
<img className="center-fit" src={landscape} alt="sd landscape" />
Expand All @@ -26,7 +31,14 @@ export const Body: React.FC = () => {
<div className="img">
<img src={EducationVis} alt="Education Visualization"></img>
</div>
<div className="image_line-heading">Education</div>
<div
onClick={() => {
navigate("/Education");
}}
className="image_line-heading"
>
Education
</div>
<div className="image_line-description">
Lorem ipsum dolor sit amet, sed do consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et
Expand All @@ -36,7 +48,14 @@ export const Body: React.FC = () => {
<div className="img">
<img src={HomelessnessVis} alt="Homelessness Visualization"></img>
</div>
<div className="image_line-heading">Homelessness</div>
<div
onClick={() => {
navigate("/Homelessness");
}}
className="image_line-heading"
>
Homelessness
</div>
<div className="image_line-description">
Lorem ipsum dolor sit amet, sed do consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et
Expand All @@ -46,7 +65,14 @@ export const Body: React.FC = () => {
<div className="img">
<img src={MunicipalVis} alt="Municipal Visualization"></img>
</div>
<div className="image_line-heading">Municipal</div>
<div
onClick={() => {
navigate("/Municipal");
}}
className="image_line-heading"
>
Municipal
</div>
<div className="image_line-description">
Lorem ipsum dolor sit amet, sed do consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et
Expand Down
1 change: 1 addition & 0 deletions SDCTA/src/components/Landing_Page/body.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ body {
align-items: center;
padding-top: 24px;
padding-bottom: 16px;
cursor: pointer;
}

.image_line-description {
Expand Down
87 changes: 87 additions & 0 deletions SDCTA/src/components/Membership.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import React, { useState } from "react";
import { useNavigate } from "react-router-dom";
const membershipPic = "/Images/membership-status.png";

export const Membership: React.FC = () => {
const [readMore, setReadMore] = useState(false);
const navigate = useNavigate();

const extraContent = (
<text>
<li>
Participate in the <b>Issues Sub-Committee</b>
</li>
<li>
Receive major <b>event ticket discounts</b>, invitations to{" "}
<b>VIP events</b>, and invitations to <b>friendraisers</b> at Board
Members’ houses
</li>
<li>
<b>Chair events</b> and membership committees
</li>
<li>
Eligibility to be nominated to serve on the <b>Board of Directors</b>{" "}
and the <b>Executive or Rules Committee</b>
</li>
</text>
);

const linkName = readMore ? "See less benefits" : "See more benefits";

const handleMembership = (event: any): void => {
event.preventDefault();
navigate("/Subscribe");
};

// const [isDisabled, setIsDisabled] = useState(false);

return (
<div className="membership">
<h1>
<b>Membership Information</b>
</h1>
<p>
Membership Level: <span style={{ color: "#7F1922" }}>Free</span> <br />{" "}
Organization Type: N/A
</p>
<img
src={membershipPic}
alt="membership-graph"
width="814.8px"
height="120px"
/>
<h2>
<b>Why should I upgrade my membership?</b>
</h2>
<ul>
<li>
Access to <b>exclusive data visualizations</b>
</li>
<li>
Serve on the <b>Oversight Committee</b>
</li>
<li>
Access to <b>Watchdog Alerts</b>
</li>
<li>
Eligibility to be featured in the <b>members-only newsletter</b>
</li>

{readMore && extraContent}
</ul>
<a
className="read-more-link"
onClick={() => {
setReadMore(!readMore);
}}
>
<u style={{ color: "#C3272E", cursor: "pointer" }}>{linkName}</u>
<br />
</a>

<button className="change-membership" onClick={handleMembership}>
Change Membership
</button>
</div>
);
};
29 changes: 0 additions & 29 deletions SDCTA/src/components/Navbar/loginSlice.tsx

This file was deleted.

Loading