import React from 'react'; import { TouchableOpacity } from 'react-native'; import { LogoutAction } from 'ordering-components/native'; import { useTheme } from 'styled-components/native'; import { OIcon, OText } from '../shared'; import { _retrieveStoreData } from '../../providers/StoreUtil'; const LogoutButtonUI = (props: any) => { const { handleLogoutClick, text, color, iconSize } = props const theme = useTheme(); const handleClick = async () => { const data = await _retrieveStoreData('notification_state'); handleLogoutClick(data) }; return ( handleClick()} style={{ flexDirection: 'row', alignItems: 'center' }} > {text ? {text} : null} ) } export const LogoutButton = (props: any) => { const logoutProps = { ...props, isNative: true, UIComponent: LogoutButtonUI } return ( ) }