mirror of
https://github.com/lemeow125/Reactnative-notesapp.git
synced 2024-11-17 06:29:27 +08:00
Removed unused code
This commit is contained in:
parent
2559c72cd9
commit
cecc63eb7e
1 changed files with 1 additions and 14 deletions
|
@ -1,22 +1,9 @@
|
|||
import * as React from "react";
|
||||
import { View, Text, TextInput, ScrollView } from "react-native";
|
||||
import styles from "../../styles";
|
||||
import { NoteProps, RootDrawerParamList } from "../../Interfaces/Interfaces";
|
||||
import ButtonCentered from "../Buttons/ButtonCentered/ButtonCentered";
|
||||
import { useQueryClient, useMutation } from "react-query";
|
||||
import { DeleteNote } from "../Api/Api";
|
||||
import { useNavigation } from "@react-navigation/native";
|
||||
import { NoteProps } from "../../Interfaces/Interfaces";
|
||||
|
||||
export default function PublicNote(props: NoteProps) {
|
||||
const navigation = useNavigation<RootDrawerParamList>();
|
||||
const queryClient = useQueryClient();
|
||||
const mutation = useMutation({
|
||||
mutationFn: DeleteNote,
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries("notes");
|
||||
queryClient.invalidateQueries("public_notes");
|
||||
},
|
||||
});
|
||||
return (
|
||||
<View style={styles.addnotecont}>
|
||||
<View style={styles.tle}>
|
||||
|
|
Loading…
Reference in a new issue