2024-09-04 15:58:03 +02:00
|
|
|
"use client";
|
|
|
|
import React, { useState } from 'react';
|
2024-09-04 12:11:49 +02:00
|
|
|
import Luca from './Luca';
|
|
|
|
import Patrick from './Patrick';
|
|
|
|
import Yasin from './Yasin';
|
|
|
|
import './App.css'; // Import main styles
|
|
|
|
|
2024-09-04 15:58:03 +02:00
|
|
|
function MyApp() {
|
|
|
|
// State to track the current view
|
|
|
|
const [currentView, setCurrentView] = useState('landing');
|
|
|
|
|
|
|
|
// Function to handle navigation
|
|
|
|
const handleNavigation = (view: string) => {
|
|
|
|
setCurrentView(view);
|
|
|
|
};
|
2024-09-03 19:08:37 +02:00
|
|
|
|
2024-09-04 12:11:49 +02:00
|
|
|
return (
|
|
|
|
<div>
|
2024-09-04 15:58:03 +02:00
|
|
|
{/* Header with navigation buttons */}
|
|
|
|
<header className="header">
|
|
|
|
<h1>Welcome to the Programmer Space</h1>
|
|
|
|
<nav>
|
|
|
|
<button onClick={() => handleNavigation('landing')}>Home</button>
|
|
|
|
<button onClick={() => handleNavigation('luca')}>Luca</button>
|
|
|
|
<button onClick={() => handleNavigation('patrick')}>Patrick</button>
|
|
|
|
<button onClick={() => handleNavigation('yasin')}>Yasin</button>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<div className="content">
|
|
|
|
{/* Conditionally render the selected component */}
|
|
|
|
{currentView === 'landing' && <p>Welcome to our site! Choose a programmer's space above.</p>}
|
|
|
|
{currentView === 'luca' && <Luca />}
|
|
|
|
{currentView === 'patrick' && <Patrick />}
|
|
|
|
{currentView === 'yasin' && <Yasin />}
|
2024-09-04 12:11:49 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
2024-09-03 19:08:37 +02:00
|
|
|
}
|
2024-09-04 15:58:03 +02:00
|
|
|
|
|
|
|
export default MyApp;
|