mirror of
https://github.com/lemeow125/Reactnative-notesapp.git
synced 2024-11-16 22:19:26 +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 * as React from "react";
|
||||||
import { View, Text, TextInput, ScrollView } from "react-native";
|
import { View, Text, TextInput, ScrollView } from "react-native";
|
||||||
import styles from "../../styles";
|
import styles from "../../styles";
|
||||||
import { NoteProps, RootDrawerParamList } from "../../Interfaces/Interfaces";
|
import { NoteProps } 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";
|
|
||||||
|
|
||||||
export default function PublicNote(props: NoteProps) {
|
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 (
|
return (
|
||||||
<View style={styles.addnotecont}>
|
<View style={styles.addnotecont}>
|
||||||
<View style={styles.tle}>
|
<View style={styles.tle}>
|
||||||
|
|
Loading…
Reference in a new issue