Changeset e903234 for pages/admin
- Timestamp:
- 07/17/22 09:43:05 (2 years ago)
- Branches:
- main
- Children:
- faff334
- Parents:
- e007fcd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pages/admin/index.js
re007fcd re903234 2 2 3 3 import React from 'react' 4 import Complaints from '../../components/admin/Complaints' 5 import Dashboard from '../../components/admin/Dashboard' 6 import LiveGames from '../../components/admin/LiveGames' 7 import Login from '../../components/admin/Login' 8 9 import { useSelector } from 'react-redux'; 10 import Loading from '../../components/Loading' 4 11 5 12 const Admin = () => { 6 return ( 7 <div> 8 <Head> 9 <title>Caessino - Activate account</title> 10 </Head> 11 12 Admin 13 </div> 14 ) 13 const adminState = useSelector(state => state.admin); 14 15 return ( 16 <div> 17 <Head> 18 <title>Caessino - Admin dashboard</title> 19 </Head> 20 21 22 <Loading/> 23 24 { adminState.admin.session_id === '' ? ( 25 <Login/> 26 ) : ( 27 <Dashboard/> 28 )} 29 30 { adminState.admin.displays.complaintsScreen && <Complaints/> } 31 32 { adminState.admin.displays.liveGamesScreen && <LiveGames/> } 33 </div> 34 ) 15 35 } 16 36
Note:
See TracChangeset
for help on using the changeset viewer.