diff --git a/resources/js/views/auth/SignIn.js b/resources/js/views/auth/SignIn.js
index bd00226..2a803a0 100755
--- a/resources/js/views/auth/SignIn.js
+++ b/resources/js/views/auth/SignIn.js
@@ -170,12 +170,7 @@ class SignIn extends Component {
message: {
type: 'error',
title: 'Something went wrong',
- body: (
-
- Oops? Something went wrong here.
-
Please try again.
-
- ),
+ body: 'Oops? Something went wrong here. Please try again.',
action: () => window.location.reload(),
},
});
@@ -196,7 +191,7 @@ class SignIn extends Component {
}
render() {
- const { classes, setErrors, errors: formErrors } = this.props;
+ const { classes, ...other } = this.props;
const {
loading,
@@ -208,7 +203,7 @@ class SignIn extends Component {
return (
{
- setErrors({});
- }}
validationSchema={Yup.object().shape({
[!identified
? 'username'
@@ -249,153 +241,147 @@ class SignIn extends Component {
),
})}
>
- {({ values, handleChange, errors, isSubmitting }) => {
- if (formErrors && Object.keys(formErrors).length > 0) {
- errors = formErrors;
- }
-
- return (
-
- );
- }}
+
+
+ )}
);
diff --git a/resources/js/views/auth/passwords/Request.js b/resources/js/views/auth/passwords/Request.js
index 883aada..a043938 100755
--- a/resources/js/views/auth/passwords/Request.js
+++ b/resources/js/views/auth/passwords/Request.js
@@ -39,7 +39,7 @@ class PasswordRequest extends Component {
const { email } = values;
const routeSuffix = NavigationUtils._route('auth.passwords.reset');
- const response = await axios.post('api/v1/auth/password/request', {
+ await axios.post('api/v1/auth/password/request', {
email,
routeSuffix,
});
@@ -90,12 +90,13 @@ class PasswordRequest extends Component {
}
render() {
- const { classes, location } = this.props;
+ const { classes, ...other } = this.props;
+ const { location } = this.props;
const { loading, message, email } = this.state;
return (
{
+ if (typeof title === 'string') {
+ return (
+
+ {title}
+
+ );
+ }
+
+ return title;
+};
+
+/**
+ * Format a given subTitle
+ *
+ * @param {string} subTitle The data that may need transformation
+ */
+const formattedSubTitle = subTitle => {
+ if (typeof subTitle === 'string') {
+ return {subTitle};
+ }
+
+ return subTitle;
+};
+
const Auth = props => (
(
>
<>
- {props.loading && (
-
-
-
- )}
+ {props.loading && }
(
-
- {props.message.hasOwnProperty('title')
- ? props.message.title
- : props.title}
-
-
-
- {props.message.hasOwnProperty('body')
- ? props.message.body
- : props.subTitle}
-
+ {props.message.hasOwnProperty('title')
+ ? formattedTitle(props.message.title)
+ : formattedTitle(props.title)}
+
+ {props.message.hasOwnProperty('body')
+ ? formattedSubTitle(props.message.body)
+ : formattedSubTitle(props.subTitle)}
{props.message.hasOwnProperty('type') ? (
@@ -98,35 +114,28 @@ const styles = theme => ({
},
content: {
- width: '32rem',
+ width: 512,
},
form: {
- padding: '1rem',
+ padding: 16,
[theme.breakpoints.up('sm')]: {
- padding: '2rem',
+ padding: 32,
minHeight: '75vh',
},
},
- progress: {
- margin: '0 0.5rem',
- minHeight: '0.5rem',
- borderTopRightRadius: '100%',
- borderTopLeftRadius: '100%',
- },
-
logoContainer: {
textAlign: 'center',
},
logo: {
- width: '5rem',
- height: '5rem',
+ width: 80,
+ height: 80,
},
heading: {
- margin: '2.5rem 0rem',
+ margin: '40px 0px',
textAlign: 'center',
},