Skip to content

Commit 8919474

Browse files
committed
Merge branch 'dev' into aidanprior/credentialsToBackend
# Conflicts: # client/src/App.tsx # client/src/components/Navbar.tsx # client/src/pages/Home.tsx # client/src/pages/Login.tsx # client/src/pages/Profile.tsx # client/src/types.ts
2 parents 19931a1 + 65b2f97 commit 8919474

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

client/src/App.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ import { UserDetails } from './types';
1111

1212
const App: React.FC = () => {
1313
const [isDarkMode, setIsDarkMode] = useState(false); // Dark mode state
14+
<<<<<<< HEAD
1415
const [user, setUser] = useState<UserDetails | null>(null);
16+
=======
17+
const [user, setUser] = useState<Record<string, string> | null>(null);
18+
>>>>>>> dev
1519

1620
const toggleDarkMode = () => {
1721
setIsDarkMode((prev) => !prev);
@@ -66,6 +70,7 @@ const App: React.FC = () => {
6670
checkLogin(<EventsDashboard isDarkMode={isDarkMode} />)
6771
)}
6872
/>
73+
{/* </>} */}
6974
</Routes>
7075
</Router>
7176
);

client/src/pages/Login.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,19 @@ import { useNavigate, Link } from 'react-router-dom';
33
import { UserDetails } from '../types';
44

55
const Login: React.FC<{
6+
<<<<<<< HEAD
67
setUser: React.Dispatch<React.SetStateAction<UserDetails | null>>;
78
}> = ({ setUser }) => {
89
const [localUsername, setLocalUsername] = useState('');
910
const [email, setEmail] = useState('');
1011
const [password, setPassword] = useState('');
12+
=======
13+
setUser: React.Dispatch<React.SetStateAction<Record<string, string> | null>>;
14+
}> = ({ setUser }) => {
15+
const [localUsername, setLocalUsername] = useState("");
16+
const [email, setEmail] = useState("");
17+
const [password, setPassword] = useState("");
18+
>>>>>>> dev
1119
const [error, setError] = useState<string | null>(null);
1220
const navigate = useNavigate();
1321

client/src/pages/Profile.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
<<<<<<< HEAD
23
import { AWSCredentials, ProfileProps, UserDetails } from '../types';
34

45
const Profile: React.FC<ProfileProps> = ({ isDarkMode, user, setUser }) => {
@@ -37,6 +38,11 @@ const Profile: React.FC<ProfileProps> = ({ isDarkMode, user, setUser }) => {
3738
console.error(error);
3839
});
3940
}
41+
=======
42+
import { ProfileProps } from "../types";
43+
44+
const Profile: React.FC<ProfileProps> = ({ isDarkMode, user }) => {
45+
>>>>>>> dev
4046

4147
return (
4248
<div className={`profile-container ${isDarkMode ? 'dark-mode' : ''}`}>
@@ -50,6 +56,7 @@ const Profile: React.FC<ProfileProps> = ({ isDarkMode, user, setUser }) => {
5056
</div>
5157
<div className="profile-info">
5258
<div className="info-container">
59+
<<<<<<< HEAD
5360
<p>Username: {user?.username ?? 'Not Logged In'}</p>
5461
</div>
5562
<div className="info-container">
@@ -61,6 +68,22 @@ const Profile: React.FC<ProfileProps> = ({ isDarkMode, user, setUser }) => {
6168
<div className="info-container">
6269
<p>Work Phone: {user?.work_phone ?? 'Not Logged In'}</p>
6370
</div>
71+
=======
72+
<p>Username: {user?.username ?? "Not Logged In"}</p>
73+
</div>
74+
<div className="info-container">
75+
<p>Display Name: {user?.display_name ?? "Not Logged In"}</p>
76+
</div>
77+
<div className="info-container">
78+
<p>Work Email: {user?.work_email ?? "Not Logged In"}</p>
79+
</div>
80+
<div className="info-container">
81+
<p>Work Phone: {user?.work_phone ?? "Not Logged In"}</p>
82+
</div>
83+
{/* <div className="info-container">
84+
<p>Company: {user.company}</p>
85+
</div> */}
86+
>>>>>>> dev
6487
<img
6588
className="aws-logo"
6689
src="https://a0.awsstatic.com/libra-css/images/logos/aws_logo_smile_1200x630.png"
@@ -80,6 +103,7 @@ const Profile: React.FC<ProfileProps> = ({ isDarkMode, user, setUser }) => {
80103
<label htmlFor="region">Enter Region</label>
81104
<input type="text" id="region" name="region" />
82105
</div>
106+
<<<<<<< HEAD
83107
<button className="submit-button" onClick={handleCredentialSubmit}>
84108
Submit
85109
</button>
@@ -89,10 +113,19 @@ const Profile: React.FC<ProfileProps> = ({ isDarkMode, user, setUser }) => {
89113
target="_blank"
90114
rel="noopener noreferrer"
91115
>
116+
=======
117+
<button className="submit-button">Submit</button>
118+
{/* <button className="logout-button logout-button-styled" >Logout</button> */}
119+
<a className="aws-login-button submit-button" href='https://aws.amazon.com' target="_blank" rel="noopener noreferrer">
120+
>>>>>>> dev
92121
AWS Log-in Information
93122
</a>
94123
</div>
95124

125+
<<<<<<< HEAD
126+
=======
127+
128+
>>>>>>> dev
96129
{/*}
97130
<div className="right-container">
98131
<div className="settings-section">

0 commit comments

Comments
 (0)