diff --git a/src/App.js b/src/App.js index 16982f5..24c4471 100644 --- a/src/App.js +++ b/src/App.js @@ -5,12 +5,14 @@ import Register from './pages/Dashboard/Dashboard'; import Login from './pages/Login/Login'; import Profile from './pages/Profile/Profile'; import NotFound from './pages/NotFound/NotFound'; +import Home from './pages/Home/Home'; const App = () => { return ( - } /> + } /> + } /> } /> } /> } /> diff --git a/src/assets/bc250.jpg b/src/assets/bc250.jpg new file mode 100644 index 0000000..8171412 Binary files /dev/null and b/src/assets/bc250.jpg differ diff --git a/src/assets/icons/radio_16x16.png b/src/assets/icons/radio_16x16.png new file mode 100644 index 0000000..9066724 Binary files /dev/null and b/src/assets/icons/radio_16x16.png differ diff --git a/src/assets/icons/radio_64x64.png b/src/assets/icons/radio_64x64.png new file mode 100644 index 0000000..b65843d Binary files /dev/null and b/src/assets/icons/radio_64x64.png differ diff --git a/src/assets/mwradio.jpg b/src/assets/mwradio.jpg new file mode 100644 index 0000000..45794c8 Binary files /dev/null and b/src/assets/mwradio.jpg differ diff --git a/src/assets/radio_01.jpeg b/src/assets/radio_01.jpeg new file mode 100644 index 0000000..eac90ca Binary files /dev/null and b/src/assets/radio_01.jpeg differ diff --git a/src/assets/radio_02.jpeg b/src/assets/radio_02.jpeg new file mode 100644 index 0000000..cb33dea Binary files /dev/null and b/src/assets/radio_02.jpeg differ diff --git a/src/assets/radio_03.jpeg b/src/assets/radio_03.jpeg new file mode 100644 index 0000000..f4fce16 Binary files /dev/null and b/src/assets/radio_03.jpeg differ diff --git a/src/assets/swl.jpg b/src/assets/swl.jpg new file mode 100644 index 0000000..f0729b5 Binary files /dev/null and b/src/assets/swl.jpg differ diff --git a/src/assets/swradio.jpg b/src/assets/swradio.jpg new file mode 100644 index 0000000..944fd98 Binary files /dev/null and b/src/assets/swradio.jpg differ diff --git a/src/assets/swradio1.webp b/src/assets/swradio1.webp new file mode 100644 index 0000000..6f4da4a Binary files /dev/null and b/src/assets/swradio1.webp differ diff --git a/src/pages/Home/Home.jsx b/src/pages/Home/Home.jsx new file mode 100644 index 0000000..299850e --- /dev/null +++ b/src/pages/Home/Home.jsx @@ -0,0 +1,69 @@ +import React, { useState, useEffect } from 'react'; +import { Box, Typography, Button, Modal, Container } from '@mui/material'; +import { useNavigate } from 'react-router-dom'; +import { useTheme } from '@mui/material/styles'; +import './Home.css'; // Import the CSS file + +const Home = () => { + const [open, setOpen] = useState(true); // Assuming the modal should be open by default + const navigate = useNavigate(); + const theme = useTheme(); + + // Simulate checking if the user is a returning user + const isReturningUser = false; // This should be replaced with actual logic + + const handleClose = () => { + setOpen(false); + }; + + const handleNavigate = () => { + if (isReturningUser) { + navigate('/login'); + } else { + navigate('/register'); + } + }; + + useEffect(() => { + // This is where you would check if the user is a returning user + // For demonstration, we're setting isReturningUser to false + // In a real application, you would replace this with actual logic + // For example, checking localStorage or a backend service + }, []); + + return ( + + + + + RadioLogger + + + A software tool that helps radio enthusiasts keep track of their radio communications and log their listening experiences. + + + + + + ); +}; + +export default Home; \ No newline at end of file diff --git a/src/pages/NotFound/NotFound.jsx b/src/pages/NotFound/NotFound.jsx new file mode 100644 index 0000000..552084a --- /dev/null +++ b/src/pages/NotFound/NotFound.jsx @@ -0,0 +1,51 @@ +import React from 'react'; +import { Box, Typography, Link } from '@mui/material'; +import { useNavigate } from 'react-router-dom'; + +const NotFound = () => { + const navigate = useNavigate(); + + return ( + + + 404 + + + Oops! The page you're looking for doesn't exist. + + { + e.preventDefault(); + navigate('/'); + }} + > + Go Home + + + ); +}; + +export default NotFound; \ No newline at end of file diff --git a/src/pages/Register/Register.jsx b/src/pages/Register/Register.jsx index d3983bc..be8122b 100644 --- a/src/pages/Register/Register.jsx +++ b/src/pages/Register/Register.jsx @@ -1,20 +1,18 @@ import React, { useState } from 'react'; import { Button, TextField, Box, Typography } from '@mui/material'; -import { useHistory } from 'react-router-dom'; import '../Login/Login.css'; // Import the CSS file const Register = () => { const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const [email, setEmail] = useState(''); - const history = useHistory(); const handleRegister = (e) => { e.preventDefault(); // Implement your registration logic here console.log('Registering user:', username, password, email); // After successful registration, redirect to login or dashboard - history.push('/login'); + // history.push('/login'); }; return (