feat: add deploy button
This commit is contained in:
parent
deb32352fb
commit
051bf1164a
28
frontend/components/editor/navbar/deploy.tsx
Normal file
28
frontend/components/editor/navbar/deploy.tsx
Normal file
@ -0,0 +1,28 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Play, Pause } from "lucide-react";
|
||||
|
||||
export default function DeployButtonModal() {
|
||||
const [isDeploying, setIsDeploying] = useState(false);
|
||||
|
||||
const handleDeploy = () => {
|
||||
if (isDeploying) {
|
||||
console.log("Stopping deployment...");
|
||||
|
||||
} else {
|
||||
console.log("Starting deployment...");
|
||||
}
|
||||
setIsDeploying(!isDeploying);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button variant="outline" onClick={handleDeploy}>
|
||||
{isDeploying ? <Pause className="w-4 h-4 mr-2" /> : <Play className="w-4 h-4 mr-2" />}
|
||||
{isDeploying ? "Deployed" : "Deploy"}
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user