diff options
author | Sebastian <sebasjm@gmail.com> | 2022-12-06 11:21:12 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-12-06 11:21:12 -0300 |
commit | d3a6544bc5fd7b3d2d65494ba1c3155b024a436e (patch) | |
tree | 8e66fcbd9f1ae79fa5d9288af70a827caedb2c91 /packages/anastasis-webui/src/components/picker | |
parent | e382b022030db96b8282337b304ec5e599a5f405 (diff) | |
download | wallet-core-d3a6544bc5fd7b3d2d65494ba1c3155b024a436e.tar.xz |
using web-utils in anastasis-webui
Diffstat (limited to 'packages/anastasis-webui/src/components/picker')
-rw-r--r-- | packages/anastasis-webui/src/components/picker/DurationPicker.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/anastasis-webui/src/components/picker/DurationPicker.tsx b/packages/anastasis-webui/src/components/picker/DurationPicker.tsx index 12ed158dd..c4caaec9f 100644 --- a/packages/anastasis-webui/src/components/picker/DurationPicker.tsx +++ b/packages/anastasis-webui/src/components/picker/DurationPicker.tsx @@ -21,7 +21,7 @@ import { h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { useTranslator } from "../../i18n/index.js"; +import { useTranslationContext } from "../../context/translation.js"; import "../../scss/DurationPicker.scss"; export interface Props { @@ -46,13 +46,13 @@ export function DurationPicker({ const ms = ss * 60; const hs = ms * 60; const ds = hs * 24; - const i18n = useTranslator(); + const { i18n } = useTranslationContext(); return ( <div class="rdp-picker"> {days && ( <DurationColumn - unit={i18n`days`} + unit={i18n.str`days`} max={99} value={Math.floor(value / ds)} onDecrease={value >= ds ? () => onChange(value - ds) : undefined} @@ -62,7 +62,7 @@ export function DurationPicker({ )} {hours && ( <DurationColumn - unit={i18n`hours`} + unit={i18n.str`hours`} max={23} min={1} value={Math.floor(value / hs) % 24} @@ -73,7 +73,7 @@ export function DurationPicker({ )} {minutes && ( <DurationColumn - unit={i18n`minutes`} + unit={i18n.str`minutes`} max={59} min={1} value={Math.floor(value / ms) % 60} @@ -84,7 +84,7 @@ export function DurationPicker({ )} {seconds && ( <DurationColumn - unit={i18n`seconds`} + unit={i18n.str`seconds`} max={59} value={Math.floor(value / ss) % 60} onDecrease={value >= ss ? () => onChange(value - ss) : undefined} |