feat: renamed old frontend and fixed some minor bugs

This commit is contained in:
=
2025-01-06 14:56:49 +05:30
parent 8c902d7699
commit 54377a44d3
2577 changed files with 35240 additions and 35116 deletions
@@ -20,7 +20,8 @@ export const useCreateSharedSecret = () => {
);
return data;
},
onSuccess: () => queryClient.invalidateQueries(secretSharingKeys.allSharedSecrets())
onSuccess: () =>
queryClient.invalidateQueries({ queryKey: secretSharingKeys.allSharedSecrets() })
});
};
@@ -34,7 +35,8 @@ export const useCreatePublicSharedSecret = () => {
);
return data;
},
onSuccess: () => queryClient.invalidateQueries(secretSharingKeys.allSharedSecrets())
onSuccess: () =>
queryClient.invalidateQueries({ queryKey: secretSharingKeys.allSharedSecrets() })
});
};
@@ -47,6 +49,7 @@ export const useDeleteSharedSecret = () => {
);
return data;
},
onSuccess: () => queryClient.invalidateQueries(secretSharingKeys.allSharedSecrets())
onSuccess: () =>
queryClient.invalidateQueries({ queryKey: secretSharingKeys.allSharedSecrets() })
});
};
@@ -49,9 +49,9 @@ export const useGetActiveSharedSecretById = ({
hashedHex: string | null;
password?: string;
}) => {
return useQuery<TViewSharedSecretResponse>(
secretSharingKeys.getSecretById({ id: sharedSecretId, hashedHex, password }),
async () => {
return useQuery({
queryKey: secretSharingKeys.getSecretById({ id: sharedSecretId, hashedHex, password }),
queryFn: async () => {
const { data } = await apiRequest.post<TViewSharedSecretResponse>(
`/api/v1/secret-sharing/public/${sharedSecretId}`,
{
@@ -62,8 +62,6 @@ export const useGetActiveSharedSecretById = ({
return data;
},
{
enabled: Boolean(sharedSecretId)
}
);
enabled: Boolean(sharedSecretId)
});
};