Skip to content

Commit 5f3c73f

Browse files
feat(ui): add toasters (#877)
1 parent 6493a28 commit 5f3c73f

File tree

12 files changed

+274
-17
lines changed

12 files changed

+274
-17
lines changed

packages/~/app/layout/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"dependencies": {
1515
"@~/app.core": "workspace:*",
1616
"@~/app.middleware": "workspace:*",
17+
"@~/app.ui": "workspace:*",
1718
"@~/app.urls": "workspace:*",
1819
"hono": "4.7.6",
1920
"nprogress": "0.2.0"

packages/~/app/layout/src/__snapshots__/main.test.tsx.snap

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ exports[`Main Layout 1`] = `
4646
rel="stylesheet"
4747
href="/node_modules/animate.css/source/_vars.css"
4848
/>
49+
<link
50+
rel="stylesheet"
51+
href="/node_modules/animate.css/source/_base.css"
52+
/>
53+
<link
54+
rel="stylesheet"
55+
href="/node_modules/animate.css/source/bouncing_entrances/bounceIn.css"
56+
/>
4957
5058
<!-- -->
5159
@@ -93,7 +101,10 @@ exports[`Main Layout 1`] = `
93101
"
94102
class="flex min-h-screen flex-col"
95103
>
96-
<div class="flex flex-1 flex-col"><div class="flex min-h-full flex-grow flex-col"><header role="banner" class="fr-header"><div class="fr-header__body"><div class="fr-container"><div class="fr-header__body-row"><div class="fr-header__brand fr-enlarge-link"><div class="fr-header__brand-top"><div class="fr-header__logo"><p class="fr-logo">République<br/>Française</p></div></div><div class="fr-header__service"><a href="/" title="Accueil "><p class="fr-header__service-title">Hyyypertool</p></a><p class="fr-header__service-tagline">hyyyyyyyypertool</p></div></div><div class="fr-header__tools"><div class="fr-header__tools-links"><ul class="fr-btns-group"><li><a class="fr-btn fr-btn--sm fr-btn--tertiary-no-outline fr-fi-logout-box-r-line fr-btn--icon-left" href="/auth/logout">Lara Croft</a></li></ul></div></div></div></div></div><div class="fr-header__menu fr-modal"><div class="fr-container"><nav class="fr-nav" id="navigation-494" role="navigation" aria-label="Menu principal"><ul class="fr-nav__list"><li class="fr-nav__item"><a aria-current="false" class="fr-nav__link" href="/moderations" target="_self">Moderations</a></li><li class="fr-nav__item"><a aria-current="false" class="fr-nav__link" href="/users" target="_self">Utilisateurs</a></li><li class="fr-nav__item"><a aria-current="false" class="fr-nav__link" href="/organizations" target="_self">Organisations</a></li><li class="fr-nav__item"><a aria-current="false" class="fr-nav__link" href="/organizations/domains" target="_self">Domaines à verifier</a></li></ul></nav></div></div></header><div class="relative flex flex-1 flex-col">✅</div></div></div>
104+
<div class="flex flex-1 flex-col"><div class="flex min-h-full flex-grow flex-col"><header role="banner" class="fr-header"><div class="fr-header__body"><div class="fr-container"><div class="fr-header__body-row"><div class="fr-header__brand fr-enlarge-link"><div class="fr-header__brand-top"><div class="fr-header__logo"><p class="fr-logo">République<br/>Française</p></div></div><div class="fr-header__service"><a href="/" title="Accueil "><p class="fr-header__service-title">Hyyypertool</p></a><p class="fr-header__service-tagline">hyyyyyyyypertool</p></div></div><div class="fr-header__tools"><div class="fr-header__tools-links"><ul class="fr-btns-group"><li><a class="fr-btn fr-btn--sm fr-btn--tertiary-no-outline fr-fi-logout-box-r-line fr-btn--icon-left" href="/auth/logout">Lara Croft</a></li></ul></div></div></div></div></div><div class="fr-header__menu fr-modal"><div class="fr-container"><nav class="fr-nav" id="navigation-494" role="navigation" aria-label="Menu principal"><ul class="fr-nav__list"><li class="fr-nav__item"><a aria-current="false" class="fr-nav__link" href="/moderations" target="_self">Moderations</a></li><li class="fr-nav__item"><a aria-current="false" class="fr-nav__link" href="/users" target="_self">Utilisateurs</a></li><li class="fr-nav__item"><a aria-current="false" class="fr-nav__link" href="/organizations" target="_self">Organisations</a></li><li class="fr-nav__item"><a aria-current="false" class="fr-nav__link" href="/organizations/domains" target="_self">Domaines à verifier</a></li></ul></nav></div></div></header><div class="relative flex flex-1 flex-col">✅</div></div><div class="fixed bottom-4 left-4 z-50 flex flex-col gap-2"><template><div class="animated bounceIn flex w-full max-w-xs items-center rounded-lg border border-solid border-gray-300 bg-white p-4 text-gray-500 shadow-sm" role="alert"><div class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-100 text-blue-500"><svg class="h-4 w-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.147 15.085a7.159 7.159 0 0 1-6.189 3.307A6.713 6.713 0 0 1 3.1 15.444c-2.679-4.513.287-8.737.888-9.548A4.373 4.373 0 0 0 5 1.608c1.287.953 6.445 3.218 5.537 10.5 1.5-1.122 2.706-3.01 2.853-6.14 1.433 1.049 3.993 5.395 1.757 9.117Z"></path></svg><span class="sr-only">Fire icon</span></div><div class="ms-3 text-sm font-normal">DefaultToast</div><button _="on click remove closest &lt;div[role=&#39;alert&#39;]/&gt; " type="button" class="-mx-1.5 -my-1.5 ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300" aria-label="Close"><span class="sr-only">Close</span><svg class="h-3 w-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"></path></svg></button></div></template><template><div class="animated bounceIn flex w-full max-w-xs items-center rounded-lg border border-solid border-gray-300 bg-white p-4 text-gray-500 shadow-sm" role="alert"><div class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-green-100 text-green-500"><svg class="h-5 w-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"></path></svg><span class="sr-only">Check icon</span></div><div class="ms-3 text-sm font-normal">SuccessToast</div><button _="on click remove closest &lt;div[role=&#39;alert&#39;]/&gt; " type="button" class="-mx-1.5 -my-1.5 ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300" aria-label="Close"><span class="sr-only">Close</span><svg class="h-3 w-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"></path></svg></button></div></template><template _="
105+
on every htmx:responseError from body
106+
render me then put it after me
107+
"><div class="animated bounceIn flex w-full max-w-xs items-center rounded-lg border border-solid border-gray-300 bg-white p-4 text-gray-500 shadow-sm" role="alert"><div class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-red-100 text-red-500"><svg class="h-5 w-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z"></path></svg><span class="sr-only">Error icon</span></div><div class="ms-3 text-sm font-normal">Une erreur est survenue !</div><button _="on click remove closest &lt;div[role=&#39;alert&#39;]/&gt; " type="button" class="-mx-1.5 -my-1.5 ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300" aria-label="Close"><span class="sr-only">Close</span><svg class="h-3 w-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"></path></svg></button></div></template><template><div class="animated bounceIn flex w-full max-w-xs items-center rounded-lg border border-solid border-gray-300 bg-white p-4 text-gray-500 shadow-sm" role="alert"><div class="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-orange-100 text-orange-500"><svg class="h-5 w-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"></path></svg><span class="sr-only">Warning icon</span></div><div class="ms-3 text-sm font-normal">WarningToast</div><button _="on click remove closest &lt;div[role=&#39;alert&#39;]/&gt; " type="button" class="-mx-1.5 -my-1.5 ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300" aria-label="Close"><span class="sr-only">Close</span><svg class="h-3 w-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"></path></svg></button></div></template></div></div>
97108
<footer class="container mx-auto flex flex-row justify-between p-2">
98109
<div>© 2222 🇫🇷</div>
99110
<a
@@ -157,6 +168,10 @@ exports[`Main Layout 1`] = `
157168
nonce="nonce"
158169
src="/node_modules/hyperscript.org/dist/_hyperscript.min.js"
159170
></script>
171+
<script
172+
nonce="nonce"
173+
src="/node_modules/hyperscript.org/dist/template.js"
174+
></script>
160175
</html>
161176
"
162177
`;

packages/~/app/layout/src/__snapshots__/root.test.tsx.snap

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ exports[`development 1`] = `
4646
rel="stylesheet"
4747
href="/assets/ASSETS_PATH/node_modules/animate.css/source/_vars.css"
4848
/>
49+
<link
50+
rel="stylesheet"
51+
href="/assets/ASSETS_PATH/node_modules/animate.css/source/_base.css"
52+
/>
53+
<link
54+
rel="stylesheet"
55+
href="/assets/ASSETS_PATH/node_modules/animate.css/source/bouncing_entrances/bounceIn.css"
56+
/>
4957
5058
<!-- -->
5159
@@ -162,6 +170,10 @@ exports[`development 1`] = `
162170
nonce="nonce"
163171
src="/assets/ASSETS_PATH/node_modules/hyperscript.org/dist/hdb.js"
164172
></script>
173+
<script
174+
nonce="nonce"
175+
src="/assets/ASSETS_PATH/node_modules/hyperscript.org/dist/template.js"
176+
></script>
165177
</html>
166178
"
167179
`;
@@ -212,6 +224,14 @@ exports[`production 1`] = `
212224
rel="stylesheet"
213225
href="/assets/ASSETS_PATH/node_modules/animate.css/source/_vars.css"
214226
/>
227+
<link
228+
rel="stylesheet"
229+
href="/assets/ASSETS_PATH/node_modules/animate.css/source/_base.css"
230+
/>
231+
<link
232+
rel="stylesheet"
233+
href="/assets/ASSETS_PATH/node_modules/animate.css/source/bouncing_entrances/bounceIn.css"
234+
/>
215235
216236
<!-- -->
217237
@@ -328,6 +348,10 @@ exports[`production 1`] = `
328348
nonce="nonce"
329349
src="/assets/ASSETS_PATH/node_modules/hyperscript.org/dist/hdb.js"
330350
></script>
351+
<script
352+
nonce="nonce"
353+
src="/assets/ASSETS_PATH/node_modules/hyperscript.org/dist/template.js"
354+
></script>
331355
</html>
332356
"
333357
`;

packages/~/app/layout/src/main.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { z_username } from "@~/app.core/schema/z_username";
44
import type { UserInfoVariables_Context } from "@~/app.middleware/set_userinfo";
5+
import { ToasterContainer } from "@~/app.ui/toast/components";
56
import { urls } from "@~/app.urls";
67
import type { PropsWithChildren } from "hono/jsx";
78
import { useRequestContext } from "hono/jsx-renderer";
@@ -35,6 +36,7 @@ export function Main_Layout({ children }: PropsWithChildren) {
3536
</header>
3637
<div class="relative flex flex-1 flex-col">{children}</div>
3738
</div>
39+
<ToasterContainer />
3840
</Root_Layout>
3941
);
4042
}

packages/~/app/layout/src/root.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22

3+
import { Htmx_Events } from "@~/app.core/htmx";
34
import type { App_Context } from "@~/app.middleware/context";
45
import { html, raw } from "hono/html";
56
import type { PropsWithChildren } from "hono/jsx";
@@ -63,6 +64,14 @@ export function Root_Layout({ children }: PropsWithChildren) {
6364
rel="stylesheet"
6465
href="${config.ASSETS_PATH}/node_modules/animate.css/source/_vars.css"
6566
/>
67+
<link
68+
rel="stylesheet"
69+
href="${config.ASSETS_PATH}/node_modules/animate.css/source/_base.css"
70+
/>
71+
<link
72+
rel="stylesheet"
73+
href="${config.ASSETS_PATH}/node_modules/animate.css/source/bouncing_entrances/bounceIn.css"
74+
/>
6675
6776
<!-- -->
6877
@@ -115,9 +124,9 @@ export function Root_Layout({ children }: PropsWithChildren) {
115124
</head>
116125
<body
117126
_="
118-
on every htmx:beforeSend NProgress.start()
119-
on every htmx:afterOnLoad NProgress.done()
120-
on every htmx:afterSettle NProgress.done()
127+
on every ${Htmx_Events.enum.beforeSend} NProgress.start()
128+
on every ${Htmx_Events.enum.afterOnLoad} NProgress.done()
129+
on every ${Htmx_Events.enum.afterSettle} NProgress.done()
121130
"
122131
class="flex min-h-screen flex-col"
123132
>
@@ -212,6 +221,10 @@ export function Root_Layout({ children }: PropsWithChildren) {
212221
nonce="${nonce}"
213222
src="${config.ASSETS_PATH}/node_modules/hyperscript.org/dist/_hyperscript.min.js"
214223
></script> `}
224+
<script
225+
nonce="${nonce}"
226+
src="${config.ASSETS_PATH}/node_modules/hyperscript.org/dist/template.js"
227+
></script>
215228
</html>
216229
`;
217230
}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
//
2+
3+
import { Htmx_Events } from "@~/app.core/htmx";
4+
import type { Child, PropsWithChildren } from "hono/jsx";
5+
import type { VariantProps } from "tailwind-variants";
6+
import { toast } from "../index";
7+
8+
//
9+
10+
export const DefaultToast = CommonToastFactory(
11+
<svg
12+
class="h-4 w-4"
13+
aria-hidden="true"
14+
xmlns="http://www.w3.org/2000/svg"
15+
fill="none"
16+
viewBox="0 0 18 20"
17+
>
18+
<path
19+
stroke="currentColor"
20+
stroke-linecap="round"
21+
stroke-linejoin="round"
22+
stroke-width="2"
23+
d="M15.147 15.085a7.159 7.159 0 0 1-6.189 3.307A6.713 6.713 0 0 1 3.1 15.444c-2.679-4.513.287-8.737.888-9.548A4.373 4.373 0 0 0 5 1.608c1.287.953 6.445 3.218 5.537 10.5 1.5-1.122 2.706-3.01 2.853-6.14 1.433 1.049 3.993 5.395 1.757 9.117Z"
24+
/>
25+
</svg>,
26+
"Fire icon",
27+
);
28+
29+
export const SuccessToast = CommonToastFactory(
30+
<svg
31+
class="h-5 w-5"
32+
aria-hidden="true"
33+
xmlns="http://www.w3.org/2000/svg"
34+
fill="currentColor"
35+
viewBox="0 0 20 20"
36+
>
37+
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z" />
38+
</svg>,
39+
"Check icon",
40+
);
41+
42+
export const ErrorToast = CommonToastFactory(
43+
<svg
44+
class="h-5 w-5"
45+
aria-hidden="true"
46+
xmlns="http://www.w3.org/2000/svg"
47+
fill="currentColor"
48+
viewBox="0 0 20 20"
49+
>
50+
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z" />
51+
</svg>,
52+
"Error icon",
53+
);
54+
55+
export const WarningToast = CommonToastFactory(
56+
<svg
57+
class="h-5 w-5"
58+
aria-hidden="true"
59+
xmlns="http://www.w3.org/2000/svg"
60+
fill="currentColor"
61+
viewBox="0 0 20 20"
62+
>
63+
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z" />
64+
</svg>,
65+
"Warning icon",
66+
);
67+
68+
export function ToasterContainer() {
69+
return (
70+
<div class="fixed bottom-4 left-4 z-50 flex flex-col gap-2">
71+
<template>
72+
<DefaultToast>DefaultToast</DefaultToast>
73+
</template>
74+
<template>
75+
<SuccessToast variant={{ color: "success" }}>SuccessToast</SuccessToast>
76+
</template>
77+
<template
78+
_={`
79+
on every ${Htmx_Events.enum.responseError} from body
80+
render me then put it after me
81+
`}
82+
>
83+
<ErrorToast variant={{ color: "danger" }}>
84+
Une erreur est survenue !
85+
</ErrorToast>
86+
</template>
87+
<template>
88+
<WarningToast variant={{ color: "warning" }}>WarningToast</WarningToast>
89+
</template>
90+
</div>
91+
);
92+
}
93+
94+
export function CommonToastFactory(iconNode: Child, title: string) {
95+
return function Toast(props: ToastProps) {
96+
const { children, variant } = props;
97+
const { base, body, icon, close_button } = toast(variant);
98+
99+
return (
100+
<div class={base()} role="alert">
101+
<div class={icon()}>
102+
{iconNode}
103+
<span class="sr-only">{title}</span>
104+
</div>
105+
<div class={body()}>{children}</div>
106+
<button
107+
_="on click remove closest <div[role='alert']/> "
108+
type="button"
109+
class={close_button()}
110+
aria-label="Close"
111+
>
112+
<span class="sr-only">Close</span>
113+
<svg
114+
class="h-3 w-3"
115+
aria-hidden="true"
116+
xmlns="http://www.w3.org/2000/svg"
117+
fill="none"
118+
viewBox="0 0 14 14"
119+
>
120+
<path
121+
stroke="currentColor"
122+
stroke-linecap="round"
123+
stroke-linejoin="round"
124+
stroke-width="2"
125+
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
126+
/>
127+
</svg>
128+
</button>
129+
</div>
130+
);
131+
};
132+
}
133+
134+
type ToastProps = PropsWithChildren<{
135+
variant?: VariantProps<typeof toast>;
136+
}>;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './ToasterContainer';
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
//
2+
3+
import { tv } from "tailwind-variants";
4+
5+
//
6+
7+
export const toast = tv({
8+
base: `
9+
animated
10+
bounceIn
11+
flex
12+
w-full
13+
max-w-xs
14+
items-center
15+
rounded-lg
16+
border
17+
border-solid
18+
border-gray-300
19+
bg-white
20+
p-4
21+
text-gray-500
22+
shadow-sm
23+
`,
24+
slots: {
25+
close_button: `
26+
-mx-1.5
27+
-my-1.5
28+
ms-auto
29+
inline-flex
30+
h-8
31+
w-8
32+
items-center
33+
justify-center
34+
rounded-lg
35+
bg-white
36+
p-1.5
37+
text-gray-400
38+
hover:bg-gray-100
39+
hover:text-gray-900
40+
focus:ring-2
41+
focus:ring-gray-300
42+
`,
43+
icon: `
44+
inline-flex
45+
h-8
46+
w-8
47+
shrink-0
48+
items-center
49+
justify-center
50+
rounded-lg
51+
bg-blue-100
52+
text-blue-500
53+
`,
54+
body: `
55+
ms-3
56+
text-sm
57+
font-normal
58+
`,
59+
},
60+
variants: {
61+
color: {
62+
danger: {
63+
icon: `bg-red-100 text-red-500`,
64+
},
65+
success: {
66+
icon: `bg-green-100 text-green-500`,
67+
},
68+
warning: {
69+
icon: `bg-orange-100 text-orange-500`,
70+
},
71+
},
72+
},
73+
});

packages/~/moderations/api/src/:id/duplicate_warning/Duplicate_Warning.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async function MarkModerationAsProcessed() {
157157
<form
158158
_={`
159159
on submit
160-
wait for ${Htmx_Events.enum.afterOnLoad}
160+
wait for ${Htmx_Events.enum.afterSettle}
161161
wait 2s
162162
go back
163163
`}

packages/~/moderations/ui/src/Actions/AcceptModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function AcceptModal({
4949
_={`
5050
on submit
5151
add .hidden to #acceptModal
52-
wait for ${Htmx_Events.enum.afterOnLoad}
52+
wait for ${Htmx_Events.enum.afterSettle}
5353
go to the top of body smoothly
5454
wait 2s
5555
go back

0 commit comments

Comments
 (0)