@@ -2,7 +2,7 @@ import { type PropsWithChildren, type ReactNode } from "react"
22
33import { msg } from "@lingui/core/macro"
44
5- import { useTrans } from "../../../locales"
5+ import { i18n } from "../../../locales"
66import { hstack , vstack } from "../../../styles/stack"
77import { surface } from "../../../styles/surface"
88import { zIndex } from "../../../styles/z-index"
@@ -38,7 +38,6 @@ const DialogActions = ({
3838 confirm,
3939 cancel,
4040} : Pick < DialogProps , "confirm" | "cancel" > ) => {
41- const trans = useTrans ( )
4241 if ( ! confirm && ! cancel ) return null
4342
4443 return (
@@ -50,7 +49,7 @@ const DialogActions = ({
5049 disabled = { confirm . disabled }
5150 onClick = { confirm . onClick }
5251 >
53- { confirm . caption ?? trans . _ ( msg `Confirm` ) }
52+ { confirm . caption ?? i18n . _ ( msg `Confirm` ) }
5453 </ Button >
5554 </ DialogPrimitive . Close >
5655 ) }
@@ -61,7 +60,7 @@ const DialogActions = ({
6160 disabled = { cancel . disabled }
6261 onClick = { cancel . onClick }
6362 >
64- { cancel . caption ?? trans . _ ( msg `Cancel` ) }
63+ { cancel . caption ?? i18n . _ ( msg `Cancel` ) }
6564 </ Button >
6665 </ DialogPrimitive . Close >
6766 ) }
@@ -125,7 +124,7 @@ export const Dialog = ({
125124
126125 < DialogPrimitive . Close >
127126 < IconButton
128- title = { useTrans ( msg `Close` ) }
127+ title = { i18n . _ ( msg `Close` ) }
129128 className = "absolute top-1 right-1"
130129 hideTitle
131130 icon = { XIcon }
0 commit comments