Skip to content

Commit

Permalink
fix: reset password in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
potts99 committed Nov 13, 2024
1 parent 388d19e commit fd61fb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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: <ToastAction altText="Try again">Try again</ToastAction>,
});
}
});
Expand Down
2 changes: 1 addition & 1 deletion apps/client/pages/admin/users/internal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit fd61fb5

Please sign in to comment.