diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-21 16:07:26 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-21 16:07:26 -0600 |
commit | ed146a582c140b9a472298390dafbc07bd06cf60 (patch) | |
tree | bd540e4a84244fdbdbdf5fde412fc4a179b6dae5 /src/view/com/modals/SharePost.native.tsx | |
parent | 39058cd36a9839df0e0c7e30ba486a09e30f169c (diff) | |
download | voidsky-ed146a582c140b9a472298390dafbc07bd06cf60.tar.zst |
Add web linking and proper share controls
Diffstat (limited to 'src/view/com/modals/SharePost.native.tsx')
-rw-r--r-- | src/view/com/modals/SharePost.native.tsx | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/view/com/modals/SharePost.native.tsx b/src/view/com/modals/SharePost.native.tsx deleted file mode 100644 index 01692fb74..000000000 --- a/src/view/com/modals/SharePost.native.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react' -import {Button, StyleSheet, Text, TouchableOpacity, View} from 'react-native' -import Toast from '../util/Toast' -import Clipboard from '@react-native-clipboard/clipboard' -import {s} from '../../lib/styles' -import {useStores} from '../../../state' - -export const snapPoints = ['30%'] - -export function Component({href}: {href: string}) { - const store = useStores() - const onPressCopy = () => { - Clipboard.setString(href) - Toast.show('Link copied', { - position: Toast.positions.TOP, - }) - store.shell.closeModal() - } - const onClose = () => store.shell.closeModal() - - return ( - <View> - <Text style={[s.textCenter, s.bold, s.mb10]}>Share this post</Text> - <Text style={[s.textCenter, s.mb10]}>{href}</Text> - <Button title="Copy to clipboard" onPress={onPressCopy} /> - <View style={s.p10}> - <TouchableOpacity onPress={onClose} style={styles.closeBtn}> - <Text style={s.textCenter}>Close</Text> - </TouchableOpacity> - </View> - </View> - ) -} - -const styles = StyleSheet.create({ - closeBtn: { - width: '100%', - borderColor: '#000', - borderWidth: 1, - borderRadius: 4, - padding: 10, - }, -}) |