feat: Add login link to /create page, closes OLN-63
This commit is contained in:
@ -3,7 +3,7 @@ import * as React from "react";
|
|||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { BackIcon, EmailIcon } from "outline-icons";
|
import { BackIcon, EmailIcon } from "outline-icons";
|
||||||
import { observer, inject } from "mobx-react";
|
import { observer, inject } from "mobx-react";
|
||||||
import { Redirect } from "react-router-dom";
|
import { Redirect, Link } from "react-router-dom";
|
||||||
import { find } from "lodash";
|
import { find } from "lodash";
|
||||||
import Flex from "components/Flex";
|
import Flex from "components/Flex";
|
||||||
import TeamLogo from "components/TeamLogo";
|
import TeamLogo from "components/TeamLogo";
|
||||||
@ -59,7 +59,7 @@ class Login extends React.Component<Props, State> {
|
|||||||
const hasMultipleServices = config.services.length > 1;
|
const hasMultipleServices = config.services.length > 1;
|
||||||
const defaultService = find(
|
const defaultService = find(
|
||||||
config.services,
|
config.services,
|
||||||
service => service.id === auth.lastSignedIn
|
service => service.id === auth.lastSignedIn && !isCreate
|
||||||
);
|
);
|
||||||
|
|
||||||
const header =
|
const header =
|
||||||
@ -136,7 +136,7 @@ class Login extends React.Component<Props, State> {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{config.services.map(service => {
|
{config.services.map(service => {
|
||||||
if (service.id === auth.lastSignedIn) {
|
if (defaultService && service.id === defaultService.id) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,6 +149,12 @@ class Login extends React.Component<Props, State> {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
{isCreate && (
|
||||||
|
<Note>
|
||||||
|
Already have an account? Go to <Link to="/">login</Link>.
|
||||||
|
</Note>
|
||||||
|
)}
|
||||||
</Centered>
|
</Centered>
|
||||||
</Background>
|
</Background>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user