"use client"; import { X, Copy, Check } from "lucide-react"; import { useState } from "react"; import { Button } from "./Button"; interface RestartModalProps { isOpen: boolean; onClose: () => void; changedServices: string[]; } export function RestartModal({ isOpen, onClose, changedServices, }: RestartModalProps) { const [copied, setCopied] = useState(false); const command = "docker-compose restart"; const handleCopy = async () => { await navigator.clipboard.writeText(command); setCopied(true); setTimeout(() => setCopied(false), 2000); }; if (!isOpen) return null; return ( <> {/* Backdrop */}
{/* Modal */}
{/* Header */}

Settings Saved!

{/* Content */}

Your settings have been saved successfully and the .env file has been updated.

{changedServices.length > 0 && ( <>

Restart Required

The following services need a restart to apply changes:

    {changedServices.map((service) => (
  • {service}
  • ))}

Run this command in your terminal:

{command}
)} {changedServices.length === 0 && (

No restart needed! Changes are applied immediately.

)}
{/* Footer */}
{changedServices.length > 0 && ( )}
); }