Skip to content

Commit 779db49

Browse files
author
ledouxm
committed
refactor: simplify button layout in WhitelistPanel and UsersPanel
1 parent 4e04e33 commit 779db49

1 file changed

Lines changed: 20 additions & 24 deletions

File tree

packages/frontend/src/routes/admin.lazy.tsx

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,16 @@ const WhitelistPanel = () => {
133133

134134
{error && <Alert severity="error" title={getErrorMessage(error)} />}
135135

136-
<Stack flexDirection="row" justifyContent="flex-end">
137-
<Button
138-
priority="secondary"
139-
iconId="ri-download-line"
140-
iconPosition="left"
141-
size="small"
142-
onClick={() => exportMutation.mutate()}
143-
disabled={exportMutation.isPending}
144-
>
145-
{exportMutation.isPending ? "Export..." : "Exporter en CSV"}
146-
</Button>
147-
</Stack>
136+
<Button
137+
priority="secondary"
138+
iconId="ri-download-line"
139+
iconPosition="left"
140+
size="small"
141+
onClick={() => exportMutation.mutate()}
142+
disabled={exportMutation.isPending}
143+
>
144+
{exportMutation.isPending ? "Export..." : "Exporter en CSV"}
145+
</Button>
148146

149147
{isLoading ? (
150148
<Center py="3rem">
@@ -251,18 +249,16 @@ const UsersPanel = () => {
251249

252250
{error && <Alert severity="error" title={getErrorMessage(error)} />}
253251

254-
<Stack flexDirection="row" justifyContent="flex-end">
255-
<Button
256-
priority="secondary"
257-
iconId="ri-download-line"
258-
iconPosition="left"
259-
size="small"
260-
onClick={() => exportMutation.mutate()}
261-
disabled={exportMutation.isPending}
262-
>
263-
{exportMutation.isPending ? "Export..." : "Exporter en CSV"}
264-
</Button>
265-
</Stack>
252+
<Button
253+
priority="secondary"
254+
iconId="ri-download-line"
255+
iconPosition="left"
256+
size="small"
257+
onClick={() => exportMutation.mutate()}
258+
disabled={exportMutation.isPending}
259+
>
260+
{exportMutation.isPending ? "Export..." : "Exporter en CSV"}
261+
</Button>
266262

267263
{isLoading ? (
268264
<Center py="3rem">

0 commit comments

Comments
 (0)