Skip to content

Commit

Permalink
fix: reformat
Browse files Browse the repository at this point in the history
Closes: #230
  • Loading branch information
ColinRgm committed Jan 21, 2025
1 parent c585a03 commit 9145f36
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
4 changes: 1 addition & 3 deletions nextjs-interface/src/app/dashboard/users/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ export default function Page() {
password={user.password}
/>

<DeleteUsersData
username={user.username}
/>
<DeleteUsersData username={user.username} />
</div>
</div>
))}
Expand Down
56 changes: 30 additions & 26 deletions nextjs-interface/src/app/ui/dashboard/DeleteEsp.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { Trash2 } from "lucide-react";
import { getToken } from "@/lib/context";
import {Popover, PopoverContent, PopoverTrigger} from "@/components/ui/popover";
import {Button} from "@/components/ui/button";
import {
Popover,
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover";
import { Button } from "@/components/ui/button";

export default function DeleteEsp({ id }: { id: string }) {
const deleteEsp = async (id: string) => {
Expand Down Expand Up @@ -37,29 +41,29 @@ export default function DeleteEsp({ id }: { id: string }) {
};

return (
<div className="flex cursor-pointer gap-2">
<Popover>
<PopoverTrigger>
<Trash2 />
</PopoverTrigger>
<div className="flex cursor-pointer gap-2">
<Popover>
<PopoverTrigger>
<Trash2 />
</PopoverTrigger>

<PopoverContent className="mr-5 mt-2 flex w-fit flex-col gap-2 dark:bg-zinc-800">
<p>Supprimer cet ESP ?</p>
<Button
onClick={async () => {
try {
await deleteEsp(id);
} catch (e) {
console.error(e);
}
}}
className="w-72"
>
OUI
</Button>
<Button className="w-72">NON</Button>
</PopoverContent>
</Popover>
</div>
<PopoverContent className="mr-5 mt-2 flex w-fit flex-col gap-2 dark:bg-zinc-800">
<p>Supprimer cet ESP ?</p>
<Button
onClick={async () => {
try {
await deleteEsp(id);
} catch (e) {
console.error(e);
}
}}
className="w-72"
>
OUI
</Button>
<Button className="w-72">NON</Button>
</PopoverContent>
</Popover>
</div>
);
}
}

0 comments on commit 9145f36

Please sign in to comment.