0% found this document useful (0 votes)
4 views1 page

HHH

The document is a React component named Menu that allows users to select and display different applications such as a music player, management tool, weight dial, movie app, calculator, and weather app. It uses state to track the selected application and conditionally renders the corresponding component based on the user's choice. The component includes a navigation bar with buttons for each application, triggering state updates on click.

Uploaded by

cosmeticskiza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

HHH

The document is a React component named Menu that allows users to select and display different applications such as a music player, management tool, weight dial, movie app, calculator, and weather app. It uses state to track the selected application and conditionally renders the corresponding component based on the user's choice. The component includes a navigation bar with buttons for each application, triggering state updates on click.

Uploaded by

cosmeticskiza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import React, { useState } from 'react';

import App1 from './musicplayer';


import App2 from './Gestionstg';
import App3 from './poidsidial';
import App4 from './movies';
import App5 from './calc';
import App6 from './meteo';

export default function Menu() {


var [index, setIndex] = useState("")
function Call(){
if (index == 1) {
return (<><App1 /></>)
}
else if (index == 2) {
return (<><App2 /></>)
}
else if (index == 3) {
return (<><App3 /></>)
}
else if (index == 4) {
return (<><App4 /></>)
}else if (index == 5) {
return (<><App5 /></>)
}
else if (index == 6) {
return (<><App6 /></>)
}

}
return (
<>
<div className='navbar'>
<ul>
<li><button onClick={() => {setIndex(index =
1)}}>MusicPlayer</button></li>
<li><button onClick={() => {setIndex(index =
2)}}>Gestionstg</button></li>
<li><button onClick={() => {setIndex(index =
3)}}>Poidsidial</button></li>
<li><button onClick={() => {setIndex(index =
4)}}>Movies</button></li>
<li><button onClick={() => {setIndex(index =
5)}}>Calculator</button></li>
<li><button onClick={() => {setIndex(index =
6)}}>Meteo</button></li>
</ul>

</div>
<div className='cmpenants'>
{<Call />}
</div>
</>
)
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy