feat: redirect to dashboard when document is sent

This commit is contained in:
Ephraim Atta-Duncan
2023-08-30 12:31:33 +00:00
committed by Mythie
parent f64885d2c3
commit 2aabe7ec60
2 changed files with 10 additions and 1 deletions

View File

@ -130,7 +130,13 @@ export const EditDocumentForm = ({
},
});
router.refresh();
toast({
title: 'Document sent',
description: 'Your document has been sent successfully.',
duration: 5000,
});
router.push('/dashboard');
} catch (err) {
console.error(err);

View File

@ -18,6 +18,9 @@ export const documentRouter = router({
try {
const { documentId, recipients } = input;
console.log('documentId', documentId);
console.log('recipients', recipients);
return await setRecipientsForDocument({
userId: ctx.user.id,
documentId,