mirror of
https://github.com/strapi/strapi.git
synced 2025-12-05 11:32:13 +00:00
typo fixes (#5795)
Signed-off-by: ierehon1905 <ierehon1905@gmail.com> Co-authored-by: cyril lopez <cyril.lpz@gmail.com>
This commit is contained in:
parent
ef457cf93f
commit
beb6e74f80
@ -15,7 +15,7 @@ const Wrapper = styled.div`
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
> p {
|
||||
width 100%;
|
||||
width: 100%;
|
||||
margin-bottom: -8px;
|
||||
padding-top: 10px;
|
||||
font-size: 13px;
|
||||
|
||||
@ -86,8 +86,7 @@ const Wrapper = styled.div`
|
||||
}
|
||||
|
||||
.bordered {
|
||||
border-top: 2px solid
|
||||
${({ withSucessBorder }) => (withSucessBorder ? '#5a9e06' : '#1c5de7')};
|
||||
border-top: 2px solid ${({ withSuccessBorder }) => (withSuccessBorder ? '#5a9e06' : '#1c5de7')};
|
||||
}
|
||||
|
||||
.borderedSuccess {
|
||||
|
||||
@ -3,13 +3,7 @@ import PropTypes from 'prop-types';
|
||||
import { get, isEmpty, omit, set, upperFirst } from 'lodash';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { Link, Redirect } from 'react-router-dom';
|
||||
import {
|
||||
auth,
|
||||
Button,
|
||||
getQueryParameters,
|
||||
getYupInnerErrors,
|
||||
request,
|
||||
} from 'strapi-helper-plugin';
|
||||
import { auth, Button, getQueryParameters, getYupInnerErrors, request } from 'strapi-helper-plugin';
|
||||
import NavTopRightWrapper from '../../components/NavTopRightWrapper';
|
||||
import LogoStrapi from '../../assets/images/logo_strapi.png';
|
||||
import PageTitle from '../../components/PageTitle';
|
||||
@ -29,9 +23,9 @@ const AuthPage = ({
|
||||
}) => {
|
||||
const [reducerState, dispatch] = useReducer(reducer, initialState);
|
||||
const codeRef = useRef();
|
||||
const aborController = new AbortController();
|
||||
const abortController = new AbortController();
|
||||
|
||||
const { signal } = aborController;
|
||||
const { signal } = abortController;
|
||||
codeRef.current = getQueryParameters(search, 'code');
|
||||
useEffect(() => {
|
||||
// Set the reset code provided by the url
|
||||
@ -49,17 +43,11 @@ const AuthPage = ({
|
||||
}
|
||||
|
||||
return () => {
|
||||
aborController.abort();
|
||||
abortController.abort();
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [authType, codeRef]);
|
||||
const {
|
||||
didCheckErrors,
|
||||
errors,
|
||||
modifiedData,
|
||||
submitSuccess,
|
||||
userEmail,
|
||||
} = reducerState.toJS();
|
||||
const { didCheckErrors, errors, modifiedData, submitSuccess, userEmail } = reducerState.toJS();
|
||||
const handleChange = ({ target: { name, value } }) => {
|
||||
dispatch({
|
||||
type: 'ON_CHANGE',
|
||||
@ -124,9 +112,7 @@ const AuthPage = ({
|
||||
} else if (authType === 'forgot-password') {
|
||||
formErrors = { email: formattedError[0] };
|
||||
} else {
|
||||
strapi.notification.error(
|
||||
get(formattedError, '0.id', 'notification.error')
|
||||
);
|
||||
strapi.notification.error(get(formattedError, '0.id', 'notification.error'));
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
@ -164,7 +150,7 @@ const AuthPage = ({
|
||||
return (
|
||||
<>
|
||||
<PageTitle title={upperFirst(authType)} />
|
||||
<Wrapper authType={authType} withSucessBorder={submitSuccess}>
|
||||
<Wrapper authType={authType} withSuccessBorder={submitSuccess}>
|
||||
<NavTopRightWrapper>
|
||||
<LocaleToggle isLogged className="localeDropdownMenuNotLogged" />
|
||||
</NavTopRightWrapper>
|
||||
@ -177,9 +163,7 @@ const AuthPage = ({
|
||||
)}
|
||||
</div>
|
||||
<div className="headerDescription">
|
||||
{authType === 'register' && (
|
||||
<FormattedMessage id="Auth.header.register.description" />
|
||||
)}
|
||||
{authType === 'register' && <FormattedMessage id="Auth.header.register.description" />}
|
||||
</div>
|
||||
{/* TODO Forgot success style */}
|
||||
<div className="formContainer bordered">
|
||||
@ -217,9 +201,7 @@ const AuthPage = ({
|
||||
})}
|
||||
<div
|
||||
className={`${
|
||||
authType === 'login'
|
||||
? 'col-6 loginButton'
|
||||
: 'col-12 buttonContainer'
|
||||
authType === 'login' ? 'col-6 loginButton' : 'col-12 buttonContainer'
|
||||
}`}
|
||||
>
|
||||
<Button
|
||||
@ -238,15 +220,9 @@ const AuthPage = ({
|
||||
</div>
|
||||
<div className="linkContainer">
|
||||
{authType !== 'register' && authType !== 'reset-password' && (
|
||||
<Link
|
||||
to={`/auth/${
|
||||
authType === 'login' ? 'forgot-password' : 'login'
|
||||
}`}
|
||||
>
|
||||
<Link to={`/auth/${authType === 'login' ? 'forgot-password' : 'login'}`}>
|
||||
<FormattedMessage
|
||||
id={`Auth.link.${
|
||||
authType === 'login' ? 'forgot-password' : 'ready'
|
||||
}`}
|
||||
id={`Auth.link.${authType === 'login' ? 'forgot-password' : 'ready'}`}
|
||||
/>
|
||||
</Link>
|
||||
)}
|
||||
|
||||
@ -9,7 +9,7 @@ const Block = styled.div`
|
||||
padding: 19px 30px 30px 30px;
|
||||
box-shadow: 0 2px 4px 0 #e3e9f3;
|
||||
border-radius: 3px;
|
||||
line-heigth: 18px;
|
||||
line-height: 18px;
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
@ -213,12 +213,12 @@ const LinkWrapper = styled.a`
|
||||
&:first-child {
|
||||
font-size: 16px;
|
||||
}
|
||||
color: #919BAE;
|
||||
color: #919bae;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.bold {
|
||||
color: #333740
|
||||
color: #333740;
|
||||
font-weight: 600;
|
||||
}
|
||||
`;
|
||||
@ -257,13 +257,4 @@ const SocialLinkWrapper = styled.div`
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
ALink,
|
||||
Block,
|
||||
Container,
|
||||
LinkWrapper,
|
||||
P,
|
||||
Separator,
|
||||
SocialLinkWrapper,
|
||||
Wave,
|
||||
};
|
||||
export { ALink, Block, Container, LinkWrapper, P, Separator, SocialLinkWrapper, Wave };
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*
|
||||
* NOTE: while this component should technically be a stateless functional
|
||||
* component (SFC), hot reloading does not currently support SFCs. If hot
|
||||
* reloading is not a neccessity for you then you can refactor it and remove
|
||||
* reloading is not a necessity for you then you can refactor it and remove
|
||||
* the linting exception.
|
||||
*/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user