chore: hide discovery button if not pointing to Revolt

This commit is contained in:
Paul Makles
2022-08-15 19:32:02 +02:00
parent 353507e17a
commit 787d5840d2
5 changed files with 29 additions and 21 deletions

View File

@@ -14,6 +14,7 @@ import WaveSVG from "../../settings/assets/wave.svg";
import { clientController } from "../../../controllers/client/ClientController";
import { takeError } from "../../../controllers/client/jsx/error";
import { IS_REVOLT } from "../../../version";
import FormField from "../FormField";
import { CaptchaBlock, CaptchaProps } from "./CaptchaBlock";
import { MailProvider } from "./MailProvider";
@@ -247,25 +248,23 @@ export const Form = observer(({ page, callback }: Props) => {
<Text id="login.resend" />
</Link>
</span>
{import.meta.env.VITE_API_URL &&
import.meta.env.VITE_API_URL !=
"https://api.revolt.chat" && (
<>
<br />
<Tip palette="primary">
<span>
<Text id="login.unofficial_instance" />{" "}
<a
href="https://developers.revolt.chat/faq/instances#what-is-a-third-party-instance"
style={{ color: "var(--accent)" }}
target="_blank"
rel="noreferrer">
<Text id="general.learn_more" />
</a>
</span>
</Tip>
</>
)}
{!IS_REVOLT && (
<>
<br />
<Tip palette="primary">
<span>
<Text id="login.unofficial_instance" />{" "}
<a
href="https://developers.revolt.chat/faq/instances#what-is-a-third-party-instance"
style={{ color: "var(--accent)" }}
target="_blank"
rel="noreferrer">
<Text id="general.learn_more" />
</a>
</span>
</Tip>
</>
)}
</>
)}
{(page === "reset" ||