|  |  | 
 |  |  |     useNotify, | 
 |  |  | } from 'react-admin'; | 
 |  |  | import { LOGIN_BACKGROUND } from '@/config/setting'; | 
 |  |  | import { tenants } from '@/api/auth'; | 
 |  |  | import { getSystemInfo, tenants } from '@/api/auth'; | 
 |  |  | import Login from "./Login"; | 
 |  |  | import Register from "./Register"; | 
 |  |  |  | 
 |  |  | 
 |  |  |     const isSmallScreen = useMediaQuery(theme.breakpoints.down('md')); | 
 |  |  |  | 
 |  |  |     const [tab, setTab] = useState(0) | 
 |  |  |     const [systemInfo, setSystemInfo] = useState({}); | 
 |  |  |     const [tenantList, setTenantList] = useState([]); | 
 |  |  |  | 
 |  |  |     const formPosition = isSmallScreen ? 'middle' : 'right' | 
 |  |  |  | 
 |  |  |     useEffect(() => { | 
 |  |  |         getSystemInfo().then(data => { | 
 |  |  |             setSystemInfo(data); | 
 |  |  |         }) | 
 |  |  |         tenants().then(data => { | 
 |  |  |             setTenantList(data); | 
 |  |  |         }) | 
 |  |  | 
 |  |  |                 <div> | 
 |  |  |                     <AppBar position="static" sx={{ backgroundColor: '#3D4BA7' }}> | 
 |  |  |                         <Toolbar> | 
 |  |  |                             <Typography variant="h6" color="inherit">Welcome</Typography> | 
 |  |  |                             <Typography variant="h6" color="inherit">{translate("page.login.title")}</Typography> | 
 |  |  |                         </Toolbar> | 
 |  |  |                     </AppBar> | 
 |  |  |                 </div> | 
 |  |  | 
 |  |  |                     textColor="primary" | 
 |  |  |                     variant="fullWidth" | 
 |  |  |                 > | 
 |  |  |                     <Tab label="Login" sx={{ fontSize: '.8em' }} /> | 
 |  |  |                     <Tab label="Register" sx={{ fontSize: '.8em' }} /> | 
 |  |  |                     <Tab label={translate('page.login.tab.login')} sx={{ fontSize: '.8em' }} /> | 
 |  |  |                     <Tab label={translate('page.login.tab.register')} sx={{ fontSize: '.8em' }} /> | 
 |  |  |                 </Tabs> | 
 |  |  |  | 
 |  |  |                 {tab === 0 && <Login tenantList={tenantList} />} | 
 |  |  |                 {tab === 1 && <Register tenantList={tenantList} />} | 
 |  |  |                 {tab === 0 && <Login systemInfo={systemInfo} tenantList={tenantList} />} | 
 |  |  |                 {tab === 1 && <Register systemInfo={systemInfo} tenantList={tenantList} />} | 
 |  |  |  | 
 |  |  |                 <Box mt={1} mb={1} sx={{ textAlign: 'center' }}> | 
 |  |  |                     <Typography variant="caption" align="center">Footer Goes Here</Typography> | 
 |  |  |                 <Box mb={1} sx={{ textAlign: 'center' }}> | 
 |  |  |                     <Typography variant="caption" align="center">{translate("page.login.footer")}</Typography> | 
 |  |  |                 </Box> | 
 |  |  |             </Card> | 
 |  |  |         </Box > |