feat: fixes and formatter
This commit is contained in:
@@ -1,24 +1,20 @@
|
||||
import React, { useCallback } from "react";
|
||||
import { BlurView } from "expo-blur";
|
||||
import { Pressable, Text } from "react-native";
|
||||
import { Palette } from "../../styles";
|
||||
import { FONT_FAMILY } from "../../styles/Fonts";
|
||||
import { Entypo } from "@expo/vector-icons";
|
||||
import { openShareSheet } from "../../utils/shareSheet";
|
||||
import React, { useCallback } from 'react'
|
||||
import { BlurView } from 'expo-blur'
|
||||
import { Pressable, Text } from 'react-native'
|
||||
import { Palette } from '../../styles'
|
||||
import { FONT_FAMILY } from '../../styles/Fonts'
|
||||
import { Entypo } from '@expo/vector-icons'
|
||||
import { openShareSheet } from '../../utils/shareSheet'
|
||||
|
||||
export default function ShareBtn({
|
||||
style,
|
||||
onPress = null,
|
||||
label = "Partager l’expérience",
|
||||
}) {
|
||||
export default function ShareBtn({ style, onPress = null, label = 'Partager l’expérience' }) {
|
||||
const handlePress = useCallback(() => {
|
||||
if (typeof onPress === "function") {
|
||||
onPress();
|
||||
return;
|
||||
if (typeof onPress === 'function') {
|
||||
onPress()
|
||||
return
|
||||
}
|
||||
|
||||
openShareSheet();
|
||||
}, [onPress]);
|
||||
openShareSheet()
|
||||
}, [onPress])
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
@@ -32,9 +28,9 @@ export default function ShareBtn({
|
||||
paddingHorizontal: 10,
|
||||
paddingVertical: 5,
|
||||
borderRadius: 15,
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
@@ -50,5 +46,5 @@ export default function ShareBtn({
|
||||
<Entypo name="share-alternative" size={16} color="white" />
|
||||
</BlurView>
|
||||
</Pressable>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user