mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix:
- Added isLoading prop - Changed notification to container name - Eslint fix
This commit is contained in:
parent
b1b01373ca
commit
7c920dde71
@ -46,7 +46,8 @@ export const ShowMonitoringCompose = ({
|
||||
|
||||
const [containerId, setContainerId] = useState<string | undefined>();
|
||||
|
||||
const { mutateAsync: restart } = api.docker.restartContainer.useMutation();
|
||||
const { mutateAsync: restart, isLoading } =
|
||||
api.docker.restartContainer.useMutation();
|
||||
|
||||
useEffect(() => {
|
||||
if (data && data?.length > 0) {
|
||||
@ -94,8 +95,10 @@ export const ShowMonitoringCompose = ({
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Button
|
||||
isLoading={isLoading}
|
||||
onClick={async () => {
|
||||
toast.success(`Restarting container ${containerId}`);
|
||||
if (!containerId) return;
|
||||
toast.success(`Restarting container ${containerAppName}`);
|
||||
await restart({ containerId }).then(() => {
|
||||
toast.success("Container restarted");
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user