|  |  | 
 |  |  |     Typography, | 
 |  |  |     Tabs, | 
 |  |  |     Tab, | 
 |  |  |     useTheme, | 
 |  |  |     useMediaQuery, | 
 |  |  | } from '@mui/material'; | 
 |  |  | import { | 
 |  |  |     useTranslate, | 
 |  |  | 
 |  |  |  | 
 |  |  | const Index = () => { | 
 |  |  |     const translate = useTranslate(); | 
 |  |  |     const theme = useTheme(); | 
 |  |  |     const isSmallScreen = useMediaQuery(theme.breakpoints.down('md')); | 
 |  |  |  | 
 |  |  |     const [tab, setTab] = useState(0) | 
 |  |  |     const [tenantList, setTenantList] = useState([]); | 
 |  |  |  | 
 |  |  |     const formPosition = isSmallScreen ? 'middle' : 'right' | 
 |  |  |  | 
 |  |  |     useEffect(() => { | 
 |  |  |         tenants().then(data => { | 
 |  |  | 
 |  |  |         }) | 
 |  |  |     }, []); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     return ( | 
 |  |  |         <Box | 
 |  |  |             sx={{ | 
 |  |  |                 display: 'flex', | 
 |  |  |                 flexDirection: 'column', | 
 |  |  |                 minHeight: '100vh', | 
 |  |  |                 alignItems: 'center', | 
 |  |  |                 justifyContent: 'flex-start', | 
 |  |  |                 // justifyContent: 'center', | 
 |  |  |                 alignItems: formPosition === 'middle' ? 'center' : 'flex-end', | 
 |  |  |                 paddingRight: formPosition === 'middle' ? 0 : '6em', | 
 |  |  |                 justifyContent: formPosition === 'middle' ? 'flex-start' : 'center', | 
 |  |  |                 background: `url(/login_bg.jpg)`, // https://unsplash.com/ | 
 |  |  |                 backgroundRepeat: 'no-repeat', | 
 |  |  |                 backgroundSize: 'cover', | 
 |  |  |             } | 
 |  |  |             } | 
 |  |  |             }} | 
 |  |  |         > | 
 |  |  |             <video | 
 |  |  |                 autoPlay | 
 |  |  | 
 |  |  |  | 
 |  |  |             <Card sx={{ | 
 |  |  |                 width: 400, | 
 |  |  |                 marginTop: '6em', | 
 |  |  |                 marginTop: formPosition === 'middle' ? '6em' : 0, | 
 |  |  |                 zIndex: 1 | 
 |  |  |             }}> | 
 |  |  |                 <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> | 
 |  |  | 
 |  |  |                 {tab === 0 && <Login tenantList={tenantList} />} | 
 |  |  |                 {tab === 1 && <Register 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 > |