@passui/tanstack 0.0.0-stage → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -2
  3. package/package.json +65 -5
  4. package/src/auth-shell/auth-shell.tsx +26 -0
  5. package/src/auth-shell/index.ts +1 -0
  6. package/src/document/compose-viewport.tsx +96 -0
  7. package/src/document/index.ts +1 -0
  8. package/src/form-fields/fields.tsx +192 -0
  9. package/src/form-fields/index.ts +2 -0
  10. package/src/form-fields/selection.tsx +149 -0
  11. package/src/form-fields/submit.tsx +40 -0
  12. package/src/forms/contexts.ts +8 -0
  13. package/src/forms/elements/form-alert.tsx +30 -0
  14. package/src/forms/elements/submit.tsx +1 -0
  15. package/src/forms/fields/avatar-picker.tsx +399 -0
  16. package/src/forms/fields/avatar.tsx +299 -0
  17. package/src/forms/fields/checkbox.tsx +1 -0
  18. package/src/forms/fields/index.ts +32 -0
  19. package/src/forms/fields/input.tsx +1 -0
  20. package/src/forms/fields/multiselect.tsx +1 -0
  21. package/src/forms/fields/otp.tsx +1 -0
  22. package/src/forms/fields/radio-card.tsx +1 -0
  23. package/src/forms/fields/switch.tsx +1 -0
  24. package/src/forms/fields/textarea.tsx +1 -0
  25. package/src/forms/index.ts +30 -0
  26. package/src/mutation/index.ts +1 -0
  27. package/src/mutation/use-app-mutation.ts +160 -0
  28. package/src/route-boundary/default-boundary.tsx +61 -0
  29. package/src/route-boundary/default-loader.tsx +19 -0
  30. package/src/route-boundary/index.ts +3 -0
  31. package/src/route-boundary/not-founder.tsx +50 -0
  32. package/src/settings/index.ts +1 -0
  33. package/src/settings/setting-list.tsx +252 -0
  34. package/src/styles.css +12 -0
  35. package/src/tables/columns.tsx +39 -0
  36. package/src/tables/data-table.tsx +617 -0
  37. package/src/tables/filter-row.tsx +260 -0
  38. package/src/tables/index.ts +3 -0
  39. package/src/tables/pagination.tsx +93 -0
  40. package/src/tables/utils.ts +35 -0
@@ -0,0 +1,299 @@
1
+ import {
2
+ ProfileImage,
3
+ ProfileImageFallback,
4
+ ProfileImageContent,
5
+ } from "@passui/react/profile-image"
6
+ import { HugeiconsIcon } from "@hugeicons/react"
7
+ import { Delete02Icon } from "@hugeicons/core-free-icons"
8
+ import { Button } from "@passui/react/button"
9
+ import { useFieldContext } from "../contexts"
10
+ import { useEffect, useRef, useState } from "react"
11
+ import type { DragEvent, ReactNode } from "react"
12
+ import { cn } from "@passui/react/cn"
13
+ import { Ambient } from "@passui/react/ambient"
14
+ import { AvatarPicker } from "./avatar-picker"
15
+ import type { AvatarPickerLabels } from "./avatar-picker"
16
+
17
+ // A field's value has three real states, not two: `null` (untouched, keep
18
+ // whatever's already there), a `File` (a new one was picked), and `false`
19
+ // (explicitly cleared, distinct from untouched — only reachable when
20
+ // `clearable` is on). The submitting form reads this to decide whether to
21
+ // upload a new file, send an explicit clear, or omit the field entirely.
22
+ export type FieldAvatarValue = File | null | false
23
+
24
+ export type FieldAvatarLabels = AvatarPickerLabels & {
25
+ edit: string
26
+ remove: string
27
+ /** Shown under a picked photo until it's kept or dropped. */
28
+ confirmHint: string
29
+ save: string
30
+ }
31
+
32
+ type FieldAvatarProps = {
33
+ /** Compact identity row for account settings. */
34
+ compact?: boolean
35
+ existingImage?: string | null
36
+ label: string
37
+ accept?: string
38
+ /** Offer removing the image once there is one. Off by default: a
39
+ * personal avatar usually just gets replaced, not cleared to nothing. */
40
+ clearable?: boolean
41
+ /** Sit the photo in a surface lit by its own colors, with this under it. */
42
+ caption?: ReactNode
43
+ /** For a translated UI; English otherwise. */
44
+ labels?: Partial<FieldAvatarLabels>
45
+ }
46
+
47
+ const DEFAULT_LABELS: FieldAvatarLabels = {
48
+ edit: "Edit",
49
+ remove: "Remove",
50
+ confirmHint:
51
+ "Press Enter to use this photo, Esc to cancel",
52
+ save: "Use photo",
53
+ cancel: "Cancel",
54
+ photo: "Photo",
55
+ photoDescription: "Choose how you appear.",
56
+ choosePhoto: "Choose Photo…",
57
+ takePhoto: "Take Photo",
58
+ capture: "Take photo",
59
+ monogram: "Monogram",
60
+ removePhoto: "Remove Photo",
61
+ }
62
+
63
+ const imageFrom = (files: FileList | null | undefined) =>
64
+ [...(files ?? [])].find((file) =>
65
+ file.type.startsWith("image/")
66
+ ) ?? null
67
+
68
+ /**
69
+ * A photo you click to replace: a small menu (choose, take, monogram), then
70
+ * the new image shows in place and Enter keeps it (Esc drops it); no cropping dialog.
71
+ */
72
+ export function FieldAvatar({
73
+ compact = false,
74
+ existingImage,
75
+ label,
76
+ accept = "image/png,image/webp,image/jpeg,image/svg+xml",
77
+ clearable = false,
78
+ caption,
79
+ labels,
80
+ }: FieldAvatarProps) {
81
+ const text = { ...DEFAULT_LABELS, ...labels }
82
+ const field = useFieldContext<FieldAvatarValue>()
83
+ const fileInputRef = useRef<HTMLInputElement>(null)
84
+ const [pending, setPending] = useState<File | null>(null)
85
+ const [sheetOpen, setSheetOpen] = useState(false)
86
+ const [dragOver, setDragOver] = useState(false)
87
+ const [preview, setPreview] = useState<string | null>(
88
+ null
89
+ )
90
+ const isCleared = field.state.value === false
91
+ const shown = pending ?? field.state.value
92
+
93
+ useEffect(() => {
94
+ if (!(shown instanceof File)) {
95
+ setPreview(null)
96
+ return
97
+ }
98
+ const url = URL.createObjectURL(shown)
99
+ setPreview(url)
100
+ return () => URL.revokeObjectURL(url)
101
+ }, [shown])
102
+
103
+ // while a picked photo waits, Enter keeps it and Escape drops it
104
+ useEffect(() => {
105
+ if (!pending) return
106
+ const onKey = (event: KeyboardEvent) => {
107
+ if (event.key === "Enter") {
108
+ event.preventDefault()
109
+ keep()
110
+ }
111
+ if (event.key === "Escape") setPending(null)
112
+ }
113
+ window.addEventListener("keydown", onKey)
114
+ return () =>
115
+ window.removeEventListener("keydown", onKey)
116
+ })
117
+
118
+ function keep() {
119
+ if (!pending) return
120
+ field.handleChange(pending)
121
+ setPending(null)
122
+ }
123
+
124
+ const currentImage = isCleared
125
+ ? undefined
126
+ : (preview ?? existingImage ?? undefined)
127
+ const canClear =
128
+ clearable &&
129
+ !pending &&
130
+ !isCleared &&
131
+ Boolean(currentImage)
132
+
133
+ function onDrop(event: DragEvent<HTMLButtonElement>) {
134
+ event.preventDefault()
135
+ setDragOver(false)
136
+ const file = imageFrom(event.dataTransfer.files)
137
+ if (file) setPending(file)
138
+ }
139
+
140
+ const photo = (
141
+ <div className="flex w-fit flex-col items-center gap-3">
142
+ <button
143
+ type="button"
144
+ onClick={() => setSheetOpen(true)}
145
+ onDragOver={(event) => {
146
+ event.preventDefault()
147
+ setDragOver(true)
148
+ }}
149
+ onDragLeave={() => setDragOver(false)}
150
+ onDrop={onDrop}
151
+ onPaste={(event) => {
152
+ const file = imageFrom(
153
+ event.clipboardData.files
154
+ )
155
+ if (file) setPending(file)
156
+ }}
157
+ className={cn(
158
+ "group relative rounded-full outline-none",
159
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
160
+ )}
161
+ aria-label={`${text.edit} ${label}`}
162
+ >
163
+ <ProfileImage
164
+ className={cn(
165
+ "relative ring-1 ring-white/40",
166
+ compact ? "size-16!" : "size-43!",
167
+ caption &&
168
+ !compact &&
169
+ "shadow-[0_16px_40px_-16px_rgb(0_0_0/0.5)]",
170
+ "transition-transform duration-300 ease-out group-hover:scale-[1.02] group-active:scale-[0.98]",
171
+ (dragOver || pending) &&
172
+ "scale-[1.04]"
173
+ )}
174
+ >
175
+ <ProfileImageContent
176
+ src={currentImage}
177
+ alt={label}
178
+ className="object-cover transition-[filter] duration-300 group-hover:brightness-90"
179
+ />
180
+ <ProfileImageFallback
181
+ className={
182
+ compact ? "text-xl" : "text-4xl"
183
+ }
184
+ >
185
+ {(
186
+ label.charAt(0) || "?"
187
+ ).toUpperCase()}
188
+ </ProfileImageFallback>
189
+ </ProfileImage>
190
+ {/* the frosted "Edit" capsule sitting on the photo's lower edge */}
191
+ {!pending && (
192
+ <span
193
+ className={cn(
194
+ "absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full px-3 py-1",
195
+ "bg-black/35 text-xs font-medium text-white backdrop-blur-md",
196
+ "opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-visible:opacity-100",
197
+ dragOver && "opacity-100"
198
+ )}
199
+ >
200
+ {text.edit}
201
+ </span>
202
+ )}
203
+ </button>
204
+ {pending && (
205
+ <div className="flex flex-col items-center gap-2 animate-in fade-in-0 slide-in-from-top-1 duration-300">
206
+ <p className="text-muted-foreground">
207
+ {text.confirmHint}
208
+ </p>
209
+ <div className="flex items-center gap-1">
210
+ <Button
211
+ type="button"
212
+ variant="ghost"
213
+ size="sm"
214
+ onClick={() => setPending(null)}
215
+ >
216
+ {text.cancel}
217
+ </Button>
218
+ <Button
219
+ variant="default"
220
+ type="button"
221
+ size="sm"
222
+ onClick={keep}
223
+ >
224
+ {text.save}
225
+ </Button>
226
+ </div>
227
+ </div>
228
+ )}
229
+ {canClear && !caption && (
230
+ <Button
231
+ type="button"
232
+ variant="ghost"
233
+ size="sm"
234
+ className="text-muted-foreground"
235
+ onClick={() => field.handleChange(false)}
236
+ >
237
+ <HugeiconsIcon icon={Delete02Icon} />
238
+ {text.remove}
239
+ </Button>
240
+ )}
241
+ </div>
242
+ )
243
+
244
+ return (
245
+ <>
246
+ {compact ? (
247
+ <div className="flex min-w-0 flex-wrap items-center gap-4">
248
+ {photo}
249
+ {!pending && caption}
250
+ </div>
251
+ ) : caption ? (
252
+ <Ambient
253
+ src={currentImage}
254
+ className="flex w-full flex-col items-center gap-4 pt-6 pb-2 text-center"
255
+ >
256
+ {photo}
257
+ {!pending && caption}
258
+ </Ambient>
259
+ ) : (
260
+ photo
261
+ )}
262
+ <input
263
+ ref={fileInputRef}
264
+ type="file"
265
+ accept={accept}
266
+ className="hidden"
267
+ onChange={(e) => {
268
+ const file = e.target.files?.[0]
269
+ e.target.value = ""
270
+ if (file) setPending(file)
271
+ }}
272
+ />
273
+ <AvatarPicker
274
+ open={sheetOpen}
275
+ onOpenChange={setSheetOpen}
276
+ label={label}
277
+ image={currentImage}
278
+ clearable={clearable}
279
+ labels={text}
280
+ onChooseFile={() => {
281
+ setSheetOpen(false)
282
+ fileInputRef.current?.click()
283
+ }}
284
+ onCapture={(file) => {
285
+ setSheetOpen(false)
286
+ setPending(file)
287
+ }}
288
+ onChoose={(file) => {
289
+ setSheetOpen(false)
290
+ field.handleChange(file)
291
+ }}
292
+ onRemove={() => {
293
+ setSheetOpen(false)
294
+ field.handleChange(false)
295
+ }}
296
+ />
297
+ </>
298
+ )
299
+ }
@@ -0,0 +1 @@
1
+ export { FieldCheckbox } from "../../form-fields/fields"
@@ -0,0 +1,32 @@
1
+ import {
2
+ FieldInput,
3
+ FieldCheckbox,
4
+ FieldTextarea,
5
+ FieldSwitch,
6
+ FieldOtp,
7
+ } from "../../form-fields/fields"
8
+ import {
9
+ FieldRadioCard,
10
+ FieldMultiselect,
11
+ } from "../../form-fields/selection"
12
+ import { FieldAvatar } from "./avatar"
13
+
14
+ export const fields = {
15
+ input: FieldInput,
16
+ checkbox: FieldCheckbox,
17
+ textarea: FieldTextarea,
18
+ switch: FieldSwitch,
19
+ radioCard: FieldRadioCard,
20
+ multiselect: FieldMultiselect,
21
+ avatar: FieldAvatar,
22
+ otp: FieldOtp,
23
+ }
24
+
25
+ export * from "./input"
26
+ export * from "./checkbox"
27
+ export * from "./textarea"
28
+ export * from "./switch"
29
+ export * from "./radio-card"
30
+ export * from "./multiselect"
31
+ export * from "./avatar"
32
+ export * from "./otp"
@@ -0,0 +1 @@
1
+ export { FieldInput } from "../../form-fields/fields"
@@ -0,0 +1 @@
1
+ export { FieldMultiselect } from "../../form-fields/selection"
@@ -0,0 +1 @@
1
+ export { FieldOtp } from "../../form-fields/fields"
@@ -0,0 +1 @@
1
+ export { FieldRadioCard } from "../../form-fields/selection"
@@ -0,0 +1 @@
1
+ export { FieldSwitch } from "../../form-fields/fields"
@@ -0,0 +1 @@
1
+ export { FieldTextarea } from "../../form-fields/fields"
@@ -0,0 +1,30 @@
1
+ import {
2
+ createFormHook,
3
+ useSelector,
4
+ useStore,
5
+ } from "@tanstack/react-form"
6
+ import { fieldContext, formContext } from "./contexts"
7
+ import { Submit } from "./elements/submit"
8
+ import { fields } from "./fields/index"
9
+
10
+ export const { useAppForm, withForm } = createFormHook({
11
+ fieldComponents: {
12
+ ...fields,
13
+ },
14
+ formComponents: {
15
+ submit: Submit,
16
+ },
17
+ fieldContext,
18
+ formContext,
19
+ })
20
+
21
+ // for reading another field's live value from within a form — e.g. a
22
+ // radioCard whose options depend on what's currently selected elsewhere in
23
+ // the same form — without subscribing the whole component to every field
24
+ export { useSelector, useStore }
25
+
26
+ // field prop/value types (e.g. FieldAvatarValue), for a caller that needs to
27
+ // type a value it hands to a field before the form itself is submitted
28
+ export * from "./fields/index"
29
+
30
+ export { FormAlert } from "./elements/form-alert"
@@ -0,0 +1 @@
1
+ export * from "./use-app-mutation"
@@ -0,0 +1,160 @@
1
+ import {
2
+ useMutation,
3
+ useQueryClient,
4
+ } from "@tanstack/react-query"
5
+ import type {
6
+ QueryKey,
7
+ UseMutationOptions,
8
+ } from "@tanstack/react-query"
9
+ import { toast } from "@passui/react/toast"
10
+
11
+ type OptimisticUpdate<TOptimisticData, TVariables> = {
12
+ queryKey: QueryKey
13
+ /** Applied to the cache immediately, before the mutation resolves. Rolled back if it errors. */
14
+ updater: (
15
+ old: TOptimisticData | undefined,
16
+ variables: TVariables
17
+ ) => TOptimisticData
18
+ }
19
+
20
+ type MutationContext<TOptimisticData> =
21
+ | {
22
+ previous: TOptimisticData | undefined
23
+ next: TOptimisticData
24
+ }
25
+ | undefined
26
+
27
+ export function shouldRestoreOptimisticSnapshot<T>(
28
+ current: T | undefined,
29
+ expected: T
30
+ ) {
31
+ return current === expected
32
+ }
33
+
34
+ type AppMutationOptions<TData, TVariables, TOptimisticData> =
35
+ Omit<
36
+ UseMutationOptions<
37
+ TData,
38
+ Error,
39
+ TVariables,
40
+ MutationContext<TOptimisticData>
41
+ >,
42
+ "onSuccess" | "onError" | "onMutate" | "onSettled"
43
+ > & {
44
+ /** Query keys to invalidate once the mutation settles, win or lose. */
45
+ invalidates?: QueryKey[]
46
+ optimisticUpdate?: OptimisticUpdate<
47
+ TOptimisticData,
48
+ TVariables
49
+ >
50
+ successMessage?:
51
+ | string
52
+ | ((data: TData, variables: TVariables) => string)
53
+ successDescription?:
54
+ | string
55
+ | ((
56
+ data: TData,
57
+ variables: TVariables
58
+ ) => string | undefined)
59
+ errorMessage?: string
60
+ onSuccess?: (
61
+ data: TData,
62
+ variables: TVariables
63
+ ) => void
64
+ onError?: (
65
+ error: Error,
66
+ variables: TVariables
67
+ ) => void
68
+ }
69
+
70
+ // every domain mutation hook in both infra and www builds on this instead
71
+ // of calling useMutation directly; optimisticUpdate's rollback only
72
+ // restores the snapshot if nothing else wrote to the same queryKey in the
73
+ // meantime
74
+ export function useAppMutation<
75
+ TData,
76
+ TVariables = void,
77
+ TOptimisticData = unknown,
78
+ >({
79
+ invalidates = [],
80
+ optimisticUpdate,
81
+ successMessage,
82
+ successDescription,
83
+ errorMessage,
84
+ onSuccess,
85
+ onError,
86
+ ...options
87
+ }: AppMutationOptions<TData, TVariables, TOptimisticData>) {
88
+ const q = useQueryClient()
89
+ return useMutation<
90
+ TData,
91
+ Error,
92
+ TVariables,
93
+ MutationContext<TOptimisticData>
94
+ >({
95
+ ...options,
96
+ onMutate: async (variables) => {
97
+ if (!optimisticUpdate) return undefined
98
+ const { queryKey, updater } = optimisticUpdate
99
+ await q.cancelQueries({ queryKey })
100
+ const previous =
101
+ q.getQueryData<TOptimisticData>(queryKey)
102
+ const next = updater(previous, variables)
103
+ q.setQueryData<TOptimisticData>(queryKey, next)
104
+ return { previous, next }
105
+ },
106
+ onSuccess: (data, variables) => {
107
+ if (successMessage) {
108
+ toast.success(
109
+ typeof successMessage === "function"
110
+ ? successMessage(data, variables)
111
+ : successMessage,
112
+ {
113
+ description:
114
+ typeof successDescription ===
115
+ "function"
116
+ ? successDescription(
117
+ data,
118
+ variables
119
+ )
120
+ : successDescription,
121
+ }
122
+ )
123
+ }
124
+ onSuccess?.(data, variables)
125
+ },
126
+ onError: (error, variables, context) => {
127
+ if (optimisticUpdate && context) {
128
+ const current = q.getQueryData(
129
+ optimisticUpdate.queryKey
130
+ )
131
+ // only roll back if nothing else has written to this key
132
+ // since our optimistic value landed, otherwise this would
133
+ // silently discard a concurrent mutation's newer change
134
+ if (
135
+ shouldRestoreOptimisticSnapshot(
136
+ current,
137
+ context.next
138
+ )
139
+ ) {
140
+ q.setQueryData(
141
+ optimisticUpdate.queryKey,
142
+ context.previous
143
+ )
144
+ }
145
+ }
146
+ toast.error(
147
+ errorMessage ?? "Something went wrong",
148
+ {
149
+ description: error.message,
150
+ }
151
+ )
152
+ onError?.(error, variables)
153
+ },
154
+ onSettled: () => {
155
+ for (const queryKey of invalidates) {
156
+ void q.invalidateQueries({ queryKey })
157
+ }
158
+ },
159
+ })
160
+ }
@@ -0,0 +1,61 @@
1
+ import type { ErrorComponentProps } from "@tanstack/react-router"
2
+ import { Button, buttonStyle } from "@passui/react/button"
3
+ import {
4
+ ErrorComponent,
5
+ Link,
6
+ useLocation,
7
+ useRouter,
8
+ } from "@tanstack/react-router"
9
+ import { cn } from "@passui/react/cn"
10
+
11
+ export function DefaultBoundary({
12
+ error,
13
+ }: ErrorComponentProps) {
14
+ const router = useRouter()
15
+ const isRoot = useLocation({
16
+ select: (location) => location.pathname === "/",
17
+ })
18
+
19
+ return (
20
+ <div className="flex min-h-100 w-full flex-col items-center justify-center gap-6 p-6 text-center">
21
+ <div className="w-full max-w-md overflow-hidden rounded-md border border-destructive/20 bg-destructive/5 p-4 text-left">
22
+ <p className="mb-2 text-xs font-semibold tracking-wider text-destructive uppercase">
23
+ Application Error
24
+ </p>
25
+ <ErrorComponent error={error} />
26
+ </div>
27
+
28
+ <div className="flex flex-wrap items-center justify-center gap-2">
29
+ <Button
30
+ onClick={() => router.invalidate()}
31
+ variant="secondary"
32
+ size="sm"
33
+ >
34
+ Try Again
35
+ </Button>
36
+
37
+ {isRoot ? (
38
+ <Link
39
+ to="/"
40
+ className={cn(
41
+ buttonStyle({
42
+ variant: "default",
43
+ size: "sm",
44
+ })
45
+ )}
46
+ >
47
+ Go Home
48
+ </Link>
49
+ ) : (
50
+ <Button
51
+ onClick={() => router.history.back()}
52
+ variant="default"
53
+ size="sm"
54
+ >
55
+ Go Back
56
+ </Button>
57
+ )}
58
+ </div>
59
+ </div>
60
+ )
61
+ }
@@ -0,0 +1,19 @@
1
+ import { HugeiconsIcon } from "@hugeicons/react"
2
+ import { Loading03Icon } from "@hugeicons/core-free-icons"
3
+ import { cn } from "@passui/react/cn"
4
+
5
+ export function DefaultLoader() {
6
+ return (
7
+ <section
8
+ className={cn(
9
+ "flex h-screen w-screen items-center justify-center",
10
+ "bg-background"
11
+ )}
12
+ >
13
+ <HugeiconsIcon
14
+ icon={Loading03Icon}
15
+ className="size-5! animate-spin duration-500"
16
+ />
17
+ </section>
18
+ )
19
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./default-boundary"
2
+ export * from "./default-loader"
3
+ export * from "./not-founder"
@@ -0,0 +1,50 @@
1
+ import { Link, useRouter } from "@tanstack/react-router"
2
+ import { Button, buttonStyle } from "@passui/react/button"
3
+ import type { PropsWithChildren } from "react"
4
+ import { cn } from "@passui/react/cn"
5
+
6
+ type NotFoundProps = PropsWithChildren
7
+
8
+ export function NotFound({ children }: NotFoundProps) {
9
+ const router = useRouter()
10
+
11
+ return (
12
+ <div className="flex min-h-[80svh] w-full flex-col items-center justify-center text-center">
13
+ <section className="mx-auto flex w-full max-w-sm flex-col items-center justify-center gap-4">
14
+ {children ?? (
15
+ <div className="flex flex-col items-center gap-2">
16
+ <span className="font-mono text-xs font-semibold tracking-widest text-destructive uppercase">
17
+ Error 404
18
+ </span>
19
+ <h2 className="text-2xl font-bold tracking-tight text-foreground">
20
+ Page Not Found
21
+ </h2>
22
+ <p className="max-w-70 text-sm text-muted-foreground">
23
+ The page you are looking for might
24
+ have been moved, renamed, or
25
+ deleted.
26
+ </p>
27
+ </div>
28
+ )}
29
+
30
+ <div className="mt-2 flex items-center gap-2">
31
+ <Button
32
+ onClick={() => router.history.back()}
33
+ variant="secondary"
34
+ size="sm"
35
+ >
36
+ Go back
37
+ </Button>
38
+ <Link
39
+ to="/"
40
+ className={cn(
41
+ buttonStyle({ size: "sm" })
42
+ )}
43
+ >
44
+ Start Over
45
+ </Link>
46
+ </div>
47
+ </section>
48
+ </div>
49
+ )
50
+ }
@@ -0,0 +1 @@
1
+ export * from "./setting-list"