Skip to content

Commit

Permalink
feat(subscriber): reset form with updated subscriber data on successf…
Browse files Browse the repository at this point in the history
…ul patch
  • Loading branch information
BiswaViraj committed Jan 31, 2025
1 parent 671a9ae commit c01a1bd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function SubscriberOverviewForm({
}) {
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
const { patchSubscriber } = usePatchSubscriber({
onSuccess: () => {
onSuccess: (data) => {
showToast({
children: () => (
<>
Expand All @@ -61,6 +61,8 @@ export default function SubscriberOverviewForm({
),
options: toastOptions,
});

form.reset({ ...data, data: JSON.stringify(data.data, null, 2) });
},
onError: () => {
showToast({
Expand Down

0 comments on commit c01a1bd

Please sign in to comment.