Creating useMessageDismissal which can be used to dismiss hint messages to the user.

This commit is contained in:
Roland 2025-01-22 18:58:18 -07:00
parent bf36568e13
commit f7bcf29cce
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
4 changed files with 130 additions and 47 deletions

View file

@ -23,6 +23,7 @@ import {
HotspotToggle,
ThrottleToggle,
Toggle,
useMessageDismissal,
WROLModeMessage
} from "../Common";
import QRCode from "react-qr-code";
@ -177,6 +178,7 @@ export function SettingsPage() {
const [qrOpen, setQrOpen] = React.useState(false);
const [ready, setReady] = React.useState(false);
const [pendingSave, setPendingSave] = React.useState(false);
const {clearAll} = useMessageDismissal();
// Get current settings from the API.
const {settings, saveSettings, fetchSettings} = React.useContext(SettingsContext);
@ -539,6 +541,11 @@ export function SettingsPage() {
</Segment>
{configsSegment}
<Segment>
<Header as='h1'>Browser Settings</Header>
<APIButton onClick={clearAll}>Show All Hints</APIButton>
</Segment>
</Container>;
}