mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Rename frontend directory (#472)
* Rename directory * Cleanup * Recover lost images * remove lint
This commit is contained in:
33
frontend/src/components/ShutDownButton.tsx
Normal file
33
frontend/src/components/ShutDownButton.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { BsPower } from "react-icons/bs";
|
||||
|
||||
import Modal from "./modal/Modal";
|
||||
import { useShutdownHelmDashboard } from "../API/other";
|
||||
|
||||
function ShutDownButton() {
|
||||
const { mutate: signOut, status } = useShutdownHelmDashboard();
|
||||
|
||||
const handleClick = async () => {
|
||||
signOut();
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="w-full">
|
||||
<Modal title="Session Ended" isOpen={status === "success"}>
|
||||
<p>
|
||||
The Helm Dashboard application has been shut down. You can now close
|
||||
the browser tab.
|
||||
</p>
|
||||
</Modal>
|
||||
|
||||
<button
|
||||
onClick={handleClick}
|
||||
title="Shut down the Helm Dashboard application"
|
||||
className="flex justify-center w-full mr-5 py-3 border border-transparent hover:border hover:border-gray-500 rounded hover:rounded-lg"
|
||||
>
|
||||
<BsPower className="w-6" />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ShutDownButton;
|
||||
Reference in New Issue
Block a user