From e82fc8ddce7b6b1ef30fa552d4619b001c15d9b9 Mon Sep 17 00:00:00 2001 From: Alexander Harding <2166114+aeharding@users.noreply.github.com> Date: Wed, 2 Aug 2023 21:57:16 -0500 Subject: [PATCH] Add in-app create account browser for native builds (#579) --- src/features/auth/Login.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/features/auth/Login.tsx b/src/features/auth/Login.tsx index 99bbc4eca9..473dbeacc9 100644 --- a/src/features/auth/Login.tsx +++ b/src/features/auth/Login.tsx @@ -27,6 +27,9 @@ import TermsSheet from "../settings/terms/TermsSheet"; import { preventPhotoswipeGalleryFocusTrap } from "../gallery/GalleryImg"; import { getCustomServers } from "../../services/app"; import { isNative } from "../../helpers/device"; +import { Browser } from "@capacitor/browser"; + +const JOIN_LEMMY_URL = "https://join-lemmy.org/instances"; export const Spinner = styled(IonSpinner)` width: 1.5rem; @@ -299,9 +302,16 @@ export default function Login({ { + if (!isNative()) return; + + e.preventDefault(); + + Browser.open({ url: JOIN_LEMMY_URL }); + }} > Don't have an account?