mirror of
https://github.com/khairul169/code-share.git
synced 2026-10-24 11:53:58 +07:00
fix: multi file editing fix
This commit is contained in:
@@ -17,7 +17,7 @@ const FileViewer = ({ id }: Props) => {
|
||||
const { initialFiles } = useData<Data>();
|
||||
const initialData = initialFiles.find((i) => i.id === id) as any;
|
||||
|
||||
const { data, isLoading, refetch } = trpc.file.getById.useQuery(id, {
|
||||
const { data, isLoading } = trpc.file.getById.useQuery(id, {
|
||||
initialData,
|
||||
});
|
||||
|
||||
@@ -29,7 +29,6 @@ const FileViewer = ({ id }: Props) => {
|
||||
const updateFileContent = trpc.file.update.useMutation({
|
||||
onSuccess: () => {
|
||||
onFileContentChange();
|
||||
refetch();
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user