Skip to content

Commit

Permalink
fix: visibility has two states
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisParedes1 committed Nov 11, 2023
1 parent 36b1027 commit ec3fad9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
23 changes: 2 additions & 21 deletions src/screens/feed/add-snap.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
import { zodResolver } from '@hookform/resolvers/zod';
import * as React from 'react';
import { useForm } from 'react-hook-form';
import { showMessage } from 'react-native-flash-message';
import { z } from 'zod';
import { Compose } from './compose';

import { useAddSnap } from '@/api';
import { getUserState } from '@/core';
import { Button, ControlledInput, showErrorMessage, View } from '@/ui';
import { View } from '@/ui';

export const AddSnap = () => {
const userData = getUserState();
return (
<View className=" ">
{/* <ControlledInput
name="content"
label="Content"
control={control}
multiline
testID="body-input"
/>
<Button
label="Add Snap"
loading={isLoading}
onPress={handleSubmit(onSubmit)}
testID="add-post-button"
/> */}

<View>
<Compose user={userData}></Compose>
</View>
);
Expand Down
6 changes: 4 additions & 2 deletions src/screens/feed/snap-visibility-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const DropdownMenu = ({
handleMenuSelection,
}: DropdownMenuProps) => {
const [isOpen, setIsOpen] = useState(false);
const options: string[] = ['Everyone can reply', 'Only followers', 'No one'];
const options: string[] = ['Everyone can reply', 'Only me'];

const handleOptionClick = (option: string) => {
handleMenuSelection(option);
Expand All @@ -40,7 +40,9 @@ const DropdownMenu = ({
key={index}
onPress={() => handleOptionClick(option)}
>
<Text>{option}</Text>
<Text className="inline rounded-full bg-blue-100 px-4 py-3">
{option}
</Text>
</TouchableOpacity>
))}
</View>
Expand Down

0 comments on commit ec3fad9

Please sign in to comment.