Refactor registration and login and improve routing
Changes:
- Improve registration and login pages
- Extract Home component from App.tsx file into its own
- Make Home component display registration or login
- Extract routes from App component and refactor routing
GitLab: #12
Change-Id: I68b01890781308282072b6dcf5e6df0d54837b4a
diff --git a/client/src/components/JamiWelcomeLogo.tsx b/client/src/components/JamiWelcomeLogo.tsx
index 8002aab..31311b6 100644
--- a/client/src/components/JamiWelcomeLogo.tsx
+++ b/client/src/components/JamiWelcomeLogo.tsx
@@ -15,31 +15,29 @@
* License along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
-import { Box, SxProps, Typography } from '@mui/material';
+import { Stack, StackProps, Typography } from '@mui/material';
import { ReactComponent as JamiLogo } from '../icons/jami-logo-icon.svg';
import { jamiLogoDefaultSize } from '../utils/constants';
-interface WelcomeLogoProps {
+interface WelcomeLogoProps extends StackProps {
logoWidth?: string;
logoHeight?: string;
- boxSxProps?: SxProps;
}
-export default function JamiWelcomeLogo(props: WelcomeLogoProps) {
+export default function JamiWelcomeLogo({ logoWidth, logoHeight, ...stackProps }: WelcomeLogoProps) {
return (
- <Box
+ <Stack
+ {...stackProps}
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
- textAlign: 'center',
- flexDirection: 'column',
- ...props.boxSxProps,
+ ...stackProps.sx,
}}
>
- <JamiLogo width={props.logoWidth ?? jamiLogoDefaultSize} height={props.logoHeight ?? jamiLogoDefaultSize} />
+ <JamiLogo width={logoWidth ?? jamiLogoDefaultSize} height={logoHeight ?? jamiLogoDefaultSize} />
<Typography variant="h1">Welcome to Jami!</Typography>
- </Box>
+ </Stack>
);
}