[UI] Open invite in modal (#28)

* [Metro > Common] Have url find openDeeplink

* [Constants] Make invite a URL

* [UI > General] Open invite modal
This commit is contained in:
Jack 2023-03-04 16:32:30 -05:00 committed by GitHub
parent 7d36903b2c
commit 6dff7f7119
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
import { ReactNative as RN, url, invites } from "@metro/common";
import { ReactNative as RN, url } from "@metro/common";
import { getAssetIDByName } from "@ui/assets";
import { Forms, Summary } from "@ui/components";
import { DISCORD_SERVER, GITHUB } from "@lib/constants";
@ -88,7 +88,7 @@ export default function General() {
label="Discord Server"
leading={<FormRow.Icon source={getAssetIDByName("Discord")} />}
trailing={FormRow.Arrow}
onPress={() => invites.acceptInviteAndTransitionToInviteChannel({ inviteKey: DISCORD_SERVER })}
onPress={() => url.openDeeplink(DISCORD_SERVER)}
/>
<FormDivider />
<FormRow