Skip to content
Snippets Groups Projects
Commit fc275da1 authored by polasudo's avatar polasudo
Browse files

add landing page

parent d8a7eaff
No related branches found
No related tags found
No related merge requests found
public/pozadie.png

5.05 MiB

import { useAuth0 } from '@auth0/auth0-react';
import { Box, Button, Typography } from '@mui/material';
import React, { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
const LandingPage = () => {
const navigate = useNavigate();
const { user } = useAuth0();
useEffect(() => {
if (user) {
navigate('/home-page');
}
}, [user]);
}, [user, navigate]);
return user ? null : (
<Box sx={{ width: '100%', maxWidth: 500 }}>
<Typography variant="h2" gutterBottom>
Landing page
</Typography>
<Button
variant="outlined"
onClick={() => {
navigate('/home-page');
}}
>
To home page
</Button>
</Box>
<div
className="h-screen relative text-white flex flex-col items-center justify-center"
style={{
backgroundImage: "url('/pozadie.png')",
backgroundSize: 'cover',
backgroundPosition: 'center',
}}
>
{/* Overlay */}
<div className="absolute inset-0 bg-black bg-opacity-70 z-0"></div>
{/* Navigation Bar */}
<div className="absolute top-0 left-0 w-full flex justify-between items-center px-6 py-4 z-10">
<div className="text-lg font-bold">People+</div>
<div className="space-x-6">
<a href="#about" className="text-sm hover:underline">
About us
</a>
<a href="#contact" className="text-sm hover:underline">
Contact
</a>
</div>
</div>
{/* Main Content */}
<div className="text-center z-10">
<h1 className="text-3xl md:text-4xl font-bold mb-6">Welcome to new marketing platform.</h1>
<div className="space-x-4">
<button
onClick={() => navigate('/home-page')}
className="px-6 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg shadow-md transition"
>
Login
</button>
<button className="px-6 py-2 bg-transparent border border-blue-600 hover:bg-blue-600 hover:text-white text-blue-600 rounded-lg shadow-md transition">
Sign up
</button>
</div>
</div>
</div>
);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment