blob: ffc907d477d4b0e5d79d6f5722a489f1af1f0059 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import React, { useState } from 'react';
import Login from './components/Login';
const App = () => {
const [isAuth, setIsAuth] = useState(false);
return (
<div className="App">
{isAuth ? <AdminPanel /> : <Login setAuth={setIsAuth} />}
</div>
);
};
const AdminPanel = () => {
// Admin panel logic
return <div>Admin Panel</div>;
};
export default App;
|