From 9064a10bd84eafd50d335674d57f42781eb85e59 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 4 Dec 2025 19:25:43 +0000 Subject: [PATCH] Auto commit: 2025-12-04T19:25:43.471Z --- index.php | 18 +++---- public/css/styles.css => src/App.css | 1 - src/App.js | 35 ++++++++++++ src/pages/Dashboard.js | 12 +++++ src/pages/LandingPage.js | 6 ++- src/pages/LoginPage.js | 80 ++++++++++++++++++++++++++++ 6 files changed, 139 insertions(+), 13 deletions(-) rename public/css/styles.css => src/App.css (99%) create mode 100644 src/App.js create mode 100644 src/pages/Dashboard.js create mode 100644 src/pages/LoginPage.js diff --git a/index.php b/index.php index d8bba78..02d036c 100644 --- a/index.php +++ b/index.php @@ -13,7 +13,7 @@ - + @@ -22,22 +22,18 @@ + +
+ + + - - - diff --git a/public/css/styles.css b/src/App.css similarity index 99% rename from public/css/styles.css rename to src/App.css index 39987f0..064f299 100644 --- a/public/css/styles.css +++ b/src/App.css @@ -1,4 +1,3 @@ - @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap'); body { diff --git a/src/App.js b/src/App.js new file mode 100644 index 0000000..65e59dc --- /dev/null +++ b/src/App.js @@ -0,0 +1,35 @@ +import React, { useState } from 'react'; +import { BrowserRouter as Router, Route, Routes, useNavigate, Navigate } from 'react-router-dom'; +import LandingPage from './pages/LandingPage'; +import LoginPage from './pages/LoginPage'; +import Dashboard from './pages/Dashboard'; // Import the new Dashboard component + +function App() { + const [isLoggedIn, setIsLoggedIn] = useState(false); // State for authentication + + // Function to handle login + const handleLogin = () => { + setIsLoggedIn(true); + }; + + // Function to handle logout (optional, but good for completeness) + const handleLogout = () => { + setIsLoggedIn(false); + }; + + return ( + + + } /> + } /> {/* Pass handleLogin to LoginPage */} + {/* Protected Dashboard Route */} + : } + /> + + + ); +} + +export default App; diff --git a/src/pages/Dashboard.js b/src/pages/Dashboard.js new file mode 100644 index 0000000..faacdf1 --- /dev/null +++ b/src/pages/Dashboard.js @@ -0,0 +1,12 @@ +import React from 'react'; + +const Dashboard = () => { + return ( +
+

Welcome to the Dashboard!

+

You are logged in.

+
+ ); +}; + +export default Dashboard; diff --git a/src/pages/LandingPage.js b/src/pages/LandingPage.js index b156aee..05ad8e5 100644 --- a/src/pages/LandingPage.js +++ b/src/pages/LandingPage.js @@ -1,3 +1,5 @@ +import { Link } from 'react-router-dom'; + const LandingPage = () => { const { Button } = primereact.button; const { Card } = primereact.card; @@ -9,7 +11,9 @@ const LandingPage = () => {

GenFleet IoT Command Center

Unified telemetry for gensets, fleets, and heavy equipment.

Monitor uptime, optimize fuel consumption, and enable predictive maintenance to keep your operations running at peak efficiency.

- + +
+
OR
+
+ + + + + + ); +}; + +export default LoginPage;