diff --git a/src/app/tools/session/page.tsx b/src/app/tools/session/page.tsx index 97023ac9a..d9a10c27c 100644 --- a/src/app/tools/session/page.tsx +++ b/src/app/tools/session/page.tsx @@ -1,7 +1,15 @@ 'use client'; import { CopyIcon, PersonIcon, ReloadIcon } from '@radix-ui/react-icons'; -import { Button, DropdownMenu, TextField } from '@radix-ui/themes'; +import { + AlertDialog, + Button, + Checkbox, + DropdownMenu, + Flex, + Text, + TextField, +} from '@radix-ui/themes'; import { debounce } from 'lodash'; import { ChangeEvent, useRef, useState } from 'react'; import PageWrapper from '../../../components/PageWrapper'; @@ -63,6 +71,12 @@ export default function Page() { }); } + function reset() { + const session = useSession.getState(); + if (!session.isTracking) return; + setSession(session.region, session.id, session.nickname); + } + return (
@@ -132,17 +146,62 @@ export default function Page() {
- + + + + + + + + + + Are you sure you want to reset? + + + This'll discard your current session and start tracking from + scratch again. + + + + + + useSession.setState({ + promptBeforeReset: !checked, + }) + } + /> + Don't ask me again + + + + + + + + + + + + + +