ebanutsya
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {Button, Text, View, StyleSheet, TouchableOpacity, Image, ScrollView} from "react-native";
|
||||
import {Button, Text, View, StyleSheet, TouchableOpacity, Image, ScrollView, GestureResponderEvent} from "react-native";
|
||||
import {useAppDispatch} from "../../redux/store";
|
||||
import * as process from "process";
|
||||
import {responsiveFontSize, responsiveHeight, responsiveWidth} from "react-native-responsive-dimensions";
|
||||
@@ -10,14 +10,19 @@ import {ScreenStackHeaderLeftView} from "react-native-screens";
|
||||
import Separator from "../../components/Separator/Separator";
|
||||
import {BottomSheetModal} from "@gorhom/bottom-sheet";
|
||||
import {useMemo, useRef, useState} from "react";
|
||||
import {openApp} from "rn-openapp";
|
||||
import SelectProductModal from "../../components/Modals/SelectProductModal/SelectProductModal";
|
||||
import selectProductModal from "../../components/Modals/SelectProductModal/SelectProductModal";
|
||||
|
||||
type SettingsElementProps = {
|
||||
icon: any;
|
||||
title: string;
|
||||
onPress?: (event: GestureResponderEvent) => void
|
||||
|
||||
}
|
||||
const SettingsElement: React.FC<SettingsElementProps> = ({icon, title}) => {
|
||||
const SettingsElement: React.FC<SettingsElementProps> = ({icon, title, onPress}) => {
|
||||
return (
|
||||
<TouchableOpacity>
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
|
||||
<View style={styles.actionsCarouselElementContainer}>
|
||||
<View style={styles.actionsCarouselImageWrapper}>
|
||||
@@ -49,6 +54,7 @@ const HistoryElement: React.FC<HistoryElementProps> = ({cost, description, color
|
||||
}
|
||||
|
||||
function ProfileScreen() {
|
||||
|
||||
const bottomSheetModalRef = useRef<BottomSheetModal>(null);
|
||||
const snapPoints = useMemo(() => ['25%', '40%'], []);
|
||||
const [modalVisible, setModalVisible] = useState(false);
|
||||
@@ -70,7 +76,9 @@ function ProfileScreen() {
|
||||
>
|
||||
<SettingsElement icon={require('assets/icons/settings/withdraw.png')} title={'Вывод'}/>
|
||||
<SettingsElement icon={require('assets/icons/settings/statistics.png')} title={'Статистика'}/>
|
||||
<SettingsElement icon={require('assets/icons/settings/printer.png')} title={'Принтеры'}/>
|
||||
<SettingsElement onPress={() => {
|
||||
openApp('assemblrprintingservice');
|
||||
}} icon={require('assets/icons/settings/printer.png')} title={'Принтеры'}/>
|
||||
</ScrollView>
|
||||
</View>
|
||||
<Separator/>
|
||||
@@ -107,6 +115,7 @@ function ProfileScreen() {
|
||||
</BottomSheetModal>
|
||||
|
||||
<View style={[styles.overlay, {display: modalVisible ? 'flex' : 'none'}]}/>
|
||||
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user