Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
shyambhongle committed Oct 24, 2024
1 parent d96fb06 commit 7582caa
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/components/sidebar/SidebarHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Popover from 'react-native-popover-view'


const SidebarHeader = () => {
const { image, displayName, email, type } = useSelector(
const { image, displayName, email } = useSelector(
(state: RootState) => state.userState,
)
const [popupVisible, setPopupVisible] = useState(false)
Expand All @@ -26,10 +26,6 @@ const SidebarHeader = () => {
openWebView(`https://web.plant-for-the-planet.org/en/profile/edit`);
}

const deleteHandler = () => {
openWebView(`https://web.plant-for-the-planet.org/en/profile/delete-account`);
}


const togglePopup = () => {
setPopupVisible((prev) => !prev)
Expand All @@ -41,7 +37,7 @@ const SidebarHeader = () => {
isVisible={popupVisible}
backgroundStyle={{ opacity: 0 }}
popoverStyle={{

backgroundColor:Colors.LIGHT_PRIMARY,
}}
onRequestClose={togglePopup}
from={(
Expand All @@ -53,8 +49,6 @@ const SidebarHeader = () => {
<Pressable
style={styles.lgtBtn}
onPress={editHandler}><Text style={styles.menuLabel}>Edit</Text></Pressable>
{type !== 'tpo' && <><View style={{ width: '90%', backgroundColor: 'lightgray', height: 1 }} />
<Pressable onPress={deleteHandler} style={styles.lgtBtn}><Text style={styles.deleteLable}>Delete</Text></Pressable></>}
</View>
</Popover>
}
Expand Down Expand Up @@ -105,7 +99,7 @@ const styles = StyleSheet.create({
alignItems: "center",
borderWidth: 0.5,
borderColor: Colors.PALE_WHITE,
backgroundColor: Colors.WHITE,
backgroundColor: Colors.LIGHT_PRIMARY,
shadowColor: Colors.PALE_WHITE,
shadowOffset: { width: 2, height: 2 },
shadowOpacity: 0.6,
Expand Down

0 comments on commit 7582caa

Please sign in to comment.