diff --git a/apps/client/components/ResetPassword/index.js b/apps/client/components/ResetPassword/index.tsx similarity index 97% rename from apps/client/components/ResetPassword/index.js rename to apps/client/components/ResetPassword/index.tsx index 94e1c90f1..3ed8fe723 100644 --- a/apps/client/components/ResetPassword/index.js +++ b/apps/client/components/ResetPassword/index.tsx @@ -1,7 +1,8 @@ +import { toast } from "@/shadcn/hooks/use-toast"; import { Dialog, Transition } from "@headlessui/react"; import { XMarkIcon } from "@heroicons/react/24/outline"; import { getCookie } from "cookies-next"; -import React, { Fragment, useState } from "react"; +import { Fragment, useState } from "react"; export default function ResetPassword({ user }) { const [open, setOpen] = useState(false); @@ -25,17 +26,15 @@ export default function ResetPassword({ user }) { .then((res) => { if (res.success) { toast({ - variant: "success", + variant: "default", title: "Password Reset Successful", description: "The password has been updated successfully.", - autoClose: 5000, }); } else { toast({ variant: "destructive", title: "Uh oh! Something went wrong.", description: "There was a problem with your request.", - action: Try again, }); } }); diff --git a/apps/client/pages/admin/users/internal/index.js b/apps/client/pages/admin/users/internal/index.js index 660edfcb2..aa3f791de 100644 --- a/apps/client/pages/admin/users/internal/index.js +++ b/apps/client/pages/admin/users/internal/index.js @@ -8,7 +8,7 @@ import { usePagination, useTable, } from "react-table"; -import ResetPassword from "../../../../components/ResetPassword"; +import ResetPassword from "../../../../components//ResetPassword"; import UpdateUserModal from "../../../../components/UpdateUserModal"; const fetchUsers = async (token) => {