Make it clearer which date is shown inside tooltip
This commit is contained in:
@@ -11,6 +11,7 @@ import { pathsConfig } from '@kit/shared/config';
|
||||
import { Button } from '@kit/ui/button';
|
||||
import { PageBody, PageHeader } from '@kit/ui/page';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
import { formatDateAndTime } from '@kit/shared/utils';
|
||||
|
||||
import { loadCurrentUserAccount } from '~/home/(user)/_lib/server/load-user-account';
|
||||
import { loadUserAnalysis } from '~/home/(user)/_lib/server/load-user-analysis';
|
||||
@@ -103,7 +104,14 @@ export default async function AnalysisResultsPage({
|
||||
<h6>
|
||||
<Trans i18nKey={`orders:status.${analysisResponse.order.status}`} />
|
||||
<ButtonTooltip
|
||||
content={`${analysisResponse.order.createdAt ? new Date(analysisResponse?.order?.createdAt).toLocaleString() : ''}`}
|
||||
content={
|
||||
<Trans
|
||||
i18nKey="analysis-results:orderCreatedAt"
|
||||
values={{
|
||||
createdAt: formatDateAndTime(analysisResponse.order.createdAt)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
className="ml-6"
|
||||
/>
|
||||
</h6>
|
||||
|
||||
@@ -12,7 +12,7 @@ export function ButtonTooltip({
|
||||
content,
|
||||
className,
|
||||
}: {
|
||||
content?: string;
|
||||
content?: string | React.ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
if (!content) return null;
|
||||
|
||||
@@ -24,5 +24,6 @@
|
||||
"view": "View results",
|
||||
"notification": {
|
||||
"body": "You have new analysis results"
|
||||
}
|
||||
},
|
||||
"orderCreatedAt": "Order created at: {{createdAt}}"
|
||||
}
|
||||
|
||||
@@ -24,5 +24,6 @@
|
||||
"view": "Vaata tulemusi",
|
||||
"notification": {
|
||||
"body": "Teil on valmis uued analüüsi tulemused"
|
||||
}
|
||||
},
|
||||
"orderCreatedAt": "Tellimus loodud: {{createdAt}}"
|
||||
}
|
||||
|
||||
@@ -23,5 +23,6 @@
|
||||
"orderTitle": "Заказ {{orderNumber}}",
|
||||
"notification": {
|
||||
"body": "Teil on valmis uued analüüsi tulemused"
|
||||
}
|
||||
},
|
||||
"orderCreatedAt": "Заказ создан: {{createdAt}}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user