Skip to content

Commit bdc4a88

Browse files
committed
Uncomment Login component import and add login route in App.tsx; fix navigation path in LandingPage.tsx
1 parent 1e9afbf commit bdc4a88

File tree

2 files changed

+40
-35
lines changed

2 files changed

+40
-35
lines changed

frontend/src/App.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
33
import { AuthProvider } from './contexts/AuthContext';
4-
//import Login from './components/Login';
4+
import Login from './components/Login'; // Uncomment this line
55
import Dashboard from './components/Dashboard';
66
import Navbar from './components/Navbar';
77
import PrivateRoute from './components/PrivateRoute';
@@ -15,6 +15,7 @@ function App() {
1515
<div style={{ display: 'flex', flexDirection: 'column', minHeight: '100vh' }}>
1616
<Routes>
1717
<Route path="/" element={<LandingPage />} />
18+
<Route path="/login" element={<Login />} /> {/* Add this route */}
1819
<Route
1920
path="/dashboard"
2021
element={
@@ -34,4 +35,4 @@ function App() {
3435
);
3536
}
3637

37-
export default App;
38+
export default App;

frontend/src/components/LandingPage.tsx

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const GradingAILanding = () => {
1313

1414
const handleSignIn = async () => {
1515
try {
16-
navigate('/Login');
16+
navigate('/login');
1717
} catch (error) {
1818
console.error('Failed to move to log in:', error);
1919
}
@@ -240,20 +240,22 @@ const GradingAILanding = () => {
240240
display: 'flex',
241241
gap: '1rem'
242242
}}>
243-
<button style={{
244-
padding: '0.5rem 1.25rem',
245-
backgroundColor: 'rgba(174, 185, 225, 0.05)',
246-
color: '#AEB9E1',
247-
border: '1px solid #7063A7',
248-
borderRadius: '4px',
249-
fontSize: '0.9rem',
250-
cursor: 'pointer',
251-
fontFamily: 'Sansation, sans-serif',
252-
pointerEvents: 'auto',
253-
transition: 'all 0.3s ease',
254-
}}
255-
className="animated-border">
256-
Log In
243+
<button
244+
onClick={handleSignIn}
245+
style={{
246+
padding: '0.5rem 1.25rem',
247+
backgroundColor: 'rgba(174, 185, 225, 0.05)',
248+
color: '#AEB9E1',
249+
border: '1px solid #7063A7',
250+
borderRadius: '4px',
251+
fontSize: '0.9rem',
252+
cursor: 'pointer',
253+
fontFamily: 'Sansation, sans-serif',
254+
pointerEvents: 'auto',
255+
transition: 'all 0.3s ease',
256+
}}
257+
className="animated-border">
258+
Log In
257259
</button>
258260
<button onClick = {handleSignIn} style={{
259261
padding: '0.5rem 1.25rem',
@@ -308,23 +310,25 @@ const GradingAILanding = () => {
308310
}}>
309311
Get personalized predictions and actionable tips to improve your performance and achieve your academic goals.
310312
</p>
311-
<button style={{
312-
padding: '0.9rem 2.5rem',
313-
background: 'linear-gradient(90deg, #7063A7, #6157FF)',
314-
color: 'white',
315-
border: 'none',
316-
borderRadius: '4px',
317-
fontSize: '1.1rem',
318-
cursor: 'pointer',
319-
fontWeight: 600,
320-
fontFamily: 'Sansation, sans-serif',
321-
pointerEvents: 'auto',
322-
boxShadow: '0 4px 15px rgba(97, 87, 255, 0.4)',
323-
position: 'relative',
324-
overflow: 'hidden',
325-
transition: 'all 0.3s ease'
326-
}}>
327-
Get Started Today
313+
<button
314+
onClick={handleSignIn}
315+
style={{
316+
padding: '0.9rem 2.5rem',
317+
background: 'linear-gradient(90deg, #7063A7, #6157FF)',
318+
color: 'white',
319+
border: 'none',
320+
borderRadius: '4px',
321+
fontSize: '1.1rem',
322+
cursor: 'pointer',
323+
fontWeight: 600,
324+
fontFamily: 'Sansation, sans-serif',
325+
pointerEvents: 'auto',
326+
boxShadow: '0 4px 15px rgba(97, 87, 255, 0.4)',
327+
position: 'relative',
328+
overflow: 'hidden',
329+
transition: 'all 0.3s ease'
330+
}}>
331+
Get Started Today
328332
</button>
329333
</div>
330334

@@ -491,4 +495,4 @@ const GradingAILanding = () => {
491495
);
492496
};
493497

494-
export default GradingAILanding;
498+
export default GradingAILanding;

0 commit comments

Comments
 (0)