Skip to content

Commit

Permalink
fixed edit and delete buttons for daily view task
Browse files Browse the repository at this point in the history
modal and fixed create task throwing an error
because button was imported wrong
  • Loading branch information
NickRubino12 committed Apr 22, 2024
1 parent f2df05d commit da5f885
Show file tree
Hide file tree
Showing 3 changed files with 1,374 additions and 2,717 deletions.
2 changes: 1 addition & 1 deletion components/AddTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ScrollView, Alert, Pressable, Text, View, TextInput } from "react-nativ
import Header from "./Header";
import DateTimePicker from "./DateTimePicker";
import TypeSelector from "./TypeSelector";
import Button from "./CreateButton";
import CreateButton from "./CreateButton";
import { saveTaskForUser } from "../services/AuthAPI";
import eventEmitter from "./EventEmitter";
import { Picker } from "@react-native-picker/picker";
Expand Down
43 changes: 2 additions & 41 deletions components/DailyView.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,57 +65,18 @@ const DailyView = ({ userID, selectedDate, navigation, isBirthday, userName }) =
</Text>
{isBirthday && (
<Text style={styles.BirthdayCelebration}>
πŸŽ‰ Your Birthday! πŸŽ‰
πŸŽ‰ Happy Birthday! πŸŽ‰
</Text>
<Text style={{ fontSize: 30, alignSelf: "center" }}>πŸŽ‰ Happy Birthday! πŸŽ‰</Text>
)}
<BirthdayCelebration
userName={userName}
isBirthday={isBirthday}
/>
<FlatList
data={tasks}
keyExtractor={(item) => item.id}
keyExtractor={(item) => item.id.toString()}
renderItem={({ item }) => (
<View style={styles.taskItem}>
<TouchableOpacity onPress={() => onTaskSelect(item)}>
<Text style={styles.taskItemText}>{item.name}</Text>
</TouchableOpacity>
{/* {item.showOptions && (
<> */}
{/* <TouchableOpacity
onPress={() => toggleCheckmark(item.id)}
style={[styles.checkmarkButton, { marginLeft: "58%" }]}
>
{item.isChecked ? (
<Fontisto
name="checkbox-active"
size={30}
color="#57BCBE"
/>
) : (
<Fontisto
name="checkbox-passive"
size={30}
color="#57BCBE"
/>
)}
</TouchableOpacity> */}
<TouchableOpacity
style={styles.deleteButton}
onPress={() => onTaskDelete(item.id)}
>
<Text style={styles.deleteButtonText}>Delete</Text>
</TouchableOpacity>
{/* </>
)} */}
{/* <TouchableOpacity onPress={() => toggleDisplayOptions(item.id)} style={{}}>
<MaterialCommunityIcons
name="dots-vertical"
size={30}
color="#57BCBE"
/>
</TouchableOpacity>*/}
<Text style={styles.taskItemText}>{item.name}</Text>
<View style={styles.taskActions}>
<TouchableOpacity
Expand Down
Loading

0 comments on commit da5f885

Please sign in to comment.