Skip to content

Commit fd61fb5

Browse files
committed
fix: reset password in admin
1 parent 388d19e commit fd61fb5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

apps/client/components/ResetPassword/index.js renamed to apps/client/components/ResetPassword/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import { toast } from "@/shadcn/hooks/use-toast";
12
import { Dialog, Transition } from "@headlessui/react";
23
import { XMarkIcon } from "@heroicons/react/24/outline";
34
import { getCookie } from "cookies-next";
4-
import React, { Fragment, useState } from "react";
5+
import { Fragment, useState } from "react";
56

67
export default function ResetPassword({ user }) {
78
const [open, setOpen] = useState(false);
@@ -25,17 +26,15 @@ export default function ResetPassword({ user }) {
2526
.then((res) => {
2627
if (res.success) {
2728
toast({
28-
variant: "success",
29+
variant: "default",
2930
title: "Password Reset Successful",
3031
description: "The password has been updated successfully.",
31-
autoClose: 5000,
3232
});
3333
} else {
3434
toast({
3535
variant: "destructive",
3636
title: "Uh oh! Something went wrong.",
3737
description: "There was a problem with your request.",
38-
action: <ToastAction altText="Try again">Try again</ToastAction>,
3938
});
4039
}
4140
});

apps/client/pages/admin/users/internal/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
usePagination,
99
useTable,
1010
} from "react-table";
11-
import ResetPassword from "../../../../components/ResetPassword";
11+
import ResetPassword from "../../../../components//ResetPassword";
1212
import UpdateUserModal from "../../../../components/UpdateUserModal";
1313

1414
const fetchUsers = async (token) => {

0 commit comments

Comments
 (0)