feat: limit expiry to 1 month & minor ui fixes

This commit is contained in:
ShubhamPalriwala
2024-06-10 08:01:32 +05:30
parent 1a6b710138
commit f6e44463c4
3 changed files with 19 additions and 4 deletions
@@ -17,6 +17,7 @@ export const useGetSharedSecrets = () => {
export const useGetActiveSharedSecretByIdAndHashedHex = (id: string, hashedHex: string) => {
return useQuery<TViewSharedSecretResponse, [string]>({
queryFn: async () => {
if(!id || !hashedHex) return Promise.resolve({ encryptedValue: "", iv: "", tag: "" });
const { data } = await apiRequest.get<TViewSharedSecretResponse>(
`/api/v1/secret-sharing/public/${id}?hashedHex=${hashedHex}`
);