mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-10-03 20:28:05 +03:00
add server share option
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import {BSON} from "realm";
|
||||
import {Alert, RefreshControl, ScrollView, StyleSheet, View} from "react-native";
|
||||
import React, {useCallback, useEffect, useLayoutEffect, useMemo, useState} from "react";
|
||||
import {Alert, RefreshControl, ScrollView, Share, StyleSheet, TouchableOpacity, View} from "react-native";
|
||||
import {ActivityIndicator, Button, Card, Paragraph, Title, useTheme} from "react-native-paper";
|
||||
import {CircleCheck, CircleDot, CreditCard, Nfc, Plus, SmartphoneNfcIcon, WifiOff} from "lucide-react-native";
|
||||
import {CircleCheck, CircleDot, CreditCard, Nfc, Plus, SmartphoneNfcIcon, WifiOff, Share as ShareIcon} from "lucide-react-native";
|
||||
import {EmptyStatePlaceholder} from "../components/EmptyStatePlaceholder";
|
||||
import {AimeCard} from "../components/AimeCard";
|
||||
|
||||
@@ -55,6 +55,11 @@ export default function ServerCardIn({route, navigation}) {
|
||||
|
||||
navigation.setOptions({
|
||||
title: server.serverName,
|
||||
headerRight: () => (
|
||||
<TouchableOpacity onPress={() => Share.share({url: `http://card.ppc.moe/#/servers/add?serverAddress=${encodeURIComponent(server.serverAddress)}`})}>
|
||||
<ShareIcon/>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
});
|
||||
}, [navigation, server]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user