</Button>
</>
:
- <Button href="/login" variant="discord">
+ <Button
+ href="/login"
+ onClick={() => {
+ if (location.pathname.length > 1) {
+ localStorage.setItem('returnPath', location.pathname.substr(1));
+ }
+ }}
+ variant="discord"
+ >
<Icon.DISCORD />
{' '}
{i18n.t('button.login')}
const Front = () => {
const navigate = useNavigate();
+ React.useEffect(() => {
+ const returnPath = localStorage.getItem('returnPath');
+ if (returnPath) {
+ localStorage.removeItem('returnPath');
+ navigate(returnPath);
+ }
+ }, []);
+
return <Container className="mt-5">
<Row>
<Col md={6}>