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/Input.tsx b/client/src/components/Input.tsx
index e867e26..ae640cf 100644
--- a/client/src/components/Input.tsx
+++ b/client/src/components/Input.tsx
@@ -88,6 +88,7 @@
</RulesDialog>
<TextField
{...props}
+ color={inputColor(props.error, props.success)}
label={'Choose an identifier'}
variant="standard"
InputLabelProps={{ shrink: !!(isSelected || input) }}
@@ -145,6 +146,7 @@
</RulesDialog>
<TextField
{...props}
+ color={inputColor(props.error, props.success)}
label="Password"
type={showPassword ? 'text' : 'password'}
variant="standard"
@@ -235,7 +237,7 @@
);
};
-export function inputColor(
+function inputColor(
error?: boolean,
success?: boolean
): 'success' | 'error' | 'primary' | 'secondary' | 'info' | 'warning' | undefined {
@@ -268,13 +270,13 @@
<ListItemIcon>
<GppMaybe />
</ListItemIcon>
- The password must contain at least one special character.
+ The password must contain at least 1 special character.
</ListItem>
<ListItem>
<ListItemIcon>
<GppMaybe />
</ListItemIcon>
- The password must be eight characters or longer for Strong strength.
+ The password must be 10 characters or longer to be considered strong.
</ListItem>
</List>
</Typography>