Skip to content

Commit

Permalink
Move constant to the top level of the module
Browse files Browse the repository at this point in the history
  • Loading branch information
hyphenized committed Jun 19, 2023
1 parent abce01a commit 0fb2a97
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ui/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,17 @@ type SettingsList = {
}

const NUMBER_OF_CLICKS_FOR_DEV_PANEL = 15

const FAQ_URL =
"https://notion.taho.xyz/Tally-Ho-Knowledge-Base-4d95ed5439c64d6db3d3d27abf1fdae5"

const AUTO_LOCK_OPTIONS = [
{ label: "5", value: String(5 * MINUTE) },
{ label: "15", value: String(15 * MINUTE) },
{ label: "30", value: String(30 * MINUTE) },
{ label: "60", value: String(60 * MINUTE) },
]

const FOOTER_ACTIONS = [
{
icon: "icons/m/discord",
Expand Down Expand Up @@ -318,13 +327,6 @@ export default function Settings(): ReactElement {
),
}

const autoLockOptions = [
{ label: "5", value: String(5 * MINUTE) },
{ label: "15", value: String(15 * MINUTE) },
{ label: "30", value: String(30 * MINUTE) },
{ label: "60", value: String(60 * MINUTE) },
]

const autoLockInterval = useBackgroundSelector(selectAutoLockInterval)

const autoLockSettings = {
Expand All @@ -341,8 +343,8 @@ export default function Settings(): ReactElement {
</div>
<div className="select_wrapper">
<SharedSelect
options={autoLockOptions}
defaultIndex={autoLockOptions.findIndex(
options={AUTO_LOCK_OPTIONS}
defaultIndex={AUTO_LOCK_OPTIONS.findIndex(
({ value }) => value === String(autoLockInterval)
)}
width="100%"
Expand Down

0 comments on commit 0fb2a97

Please sign in to comment.