mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-19 07:55:25 +02:00
improvements
This commit is contained in:
parent
a7eece7938
commit
e37eecda97
@ -1,18 +1,16 @@
|
|||||||
import {ReactElement} from "react"
|
import {ReactElement} from "react"
|
||||||
import {useNavigate} from "react-router-dom"
|
import {useNavigate} from "react-router-dom"
|
||||||
|
import {useTranslation} from "react-i18next"
|
||||||
|
|
||||||
import {ListItemButton, ListItemText} from "@mui/material"
|
import {ListItemButton, ListItemText} from "@mui/material"
|
||||||
|
|
||||||
import {DecryptedReportContent} from "~/server-types"
|
import {DecryptedReportContent} from "~/server-types"
|
||||||
import {useTranslation} from "react-i18next"
|
|
||||||
|
|
||||||
export interface ReportInformationItemProps {
|
export interface ReportInformationItemProps {
|
||||||
report: DecryptedReportContent
|
report: DecryptedReportContent
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ReportInformationItem({
|
export default function ReportInformationItem({report}: ReportInformationItemProps): ReactElement {
|
||||||
report,
|
|
||||||
}: ReportInformationItemProps): ReactElement {
|
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const {t} = useTranslation()
|
const {t} = useTranslation()
|
||||||
|
|
||||||
@ -20,7 +18,7 @@ export default function ReportInformationItem({
|
|||||||
<ListItemButton onClick={() => navigate(`/reports/${report.id}`)}>
|
<ListItemButton onClick={() => navigate(`/reports/${report.id}`)}>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary={
|
primary={
|
||||||
report.messageDetails.content.subject ?? (
|
report.messageDetails.content.subject || (
|
||||||
<i>{t("relations.report.emailMeta.emptySubject")}</i>
|
<i>{t("relations.report.emailMeta.emptySubject")}</i>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user