diff options
author | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-07-18 14:56:39 +0530 |
---|---|---|
committer | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-07-18 14:56:39 +0530 |
commit | 2f613682b733f8f03634df08270469830cad1800 (patch) | |
tree | bab1e0c7b19aa9538bbcb099d7e5b36c1f264528 /src/App.js | |
parent | 05faaf231620ce8d4ee67585bd86f1e97fd32eeb (diff) | |
download | admin-panel-2f613682b733f8f03634df08270469830cad1800.tar.gz admin-panel-2f613682b733f8f03634df08270469830cad1800.tar.bz2 admin-panel-2f613682b733f8f03634df08270469830cad1800.zip |
added the config and setup the basic auth
Diffstat (limited to 'src/App.js')
-rw-r--r-- | src/App.js | 30 |
1 files changed, 12 insertions, 18 deletions
@@ -1,25 +1,19 @@ -import logo from './logo.svg'; -import './App.css'; +import React, { useState } from 'react'; +import Login from './components/Login'; + +const App = () => { + const [isAuth, setIsAuth] = useState(false); -function App() { return ( <div className="App"> - <header className="App-header"> - <img src={logo} className="App-logo" alt="logo" /> - <p> - Edit <code>src/App.js</code> and save to reload. - </p> - <a - className="App-link" - href="https://reactjs.org" - target="_blank" - rel="noopener noreferrer" - > - Learn React - </a> - </header> + {isAuth ? <AdminPanel /> : <Login setAuth={setIsAuth} />} </div> ); -} +}; + +const AdminPanel = () => { + // Admin panel logic + return <div>Admin Panel</div>; +}; export default App; |