-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathindex.tsx
38 lines (33 loc) · 1.21 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Button } from '@janhq/joi'
import { useSetAtom } from 'jotai'
import ModalValidation, { modalValidationAtom } from './ModalConfirmReset'
import ResettingModal from './ResettingModal'
const FactoryReset = () => {
const setModalValidation = useSetAtom(modalValidationAtom)
return (
<div className="flex w-full flex-col items-start justify-between gap-4 border-b border-[hsla(var(--app-border))] py-4 first:pt-0 last:border-none sm:flex-row">
<div className="space-y-1">
<div className="flex gap-x-2">
<h6 className="font-semibold capitalize">
Reset to Factory Settings
</h6>
</div>
<p className="whitespace-pre-wrap font-medium leading-relaxed text-[hsla(var(--text-secondary))]">
Restore appplication to its initial state, erasing all models and chat
history. This action is irreversible and recommended only if the
application is corrupted.
</p>
</div>
<Button
data-testid="reset-button"
theme="destructive"
onClick={() => setModalValidation(true)}
>
Reset
</Button>
<ModalValidation />
<ResettingModal />
</div>
)
}
export default FactoryReset