Skip to content

Commit

Permalink
feat: translate the materials in the window table (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReidyT authored Nov 29, 2024
1 parent d50539d commit a42b66b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';

import { BuildingMaterialKeys } from '@/config/buildingMaterials';
import { useHouseComponents } from '@/context/HouseComponentsContext';
import {
WindowSizeType,
Expand All @@ -44,6 +45,7 @@ export const WindowControlDialog = ({
keyPrefix: 'HOUSE_CONTROL_PANEL.WINDOW_DIALOG',
});
const { t: tInsulations } = useTranslation('INSULATIONS');
const { t: tMaterials } = useTranslation('MATERIALS');

const { changeWindowSize, windowSize } = useWindowSize();
const { houseComponentsConfigurator } = useHouseComponents();
Expand Down Expand Up @@ -120,7 +122,9 @@ export const WindowControlDialog = ({
<TableBody>
{windowComponent.buildingMaterials.map((material, idx) => (
<TableRow key={`${material.name}-${idx}`}>
<TableCell component="th">{material.name}</TableCell>
<TableCell component="th">
{tMaterials(material.name as BuildingMaterialKeys)}
</TableCell>
<TableCell align="center">
{material.thickness * 100} cm
</TableCell>
Expand Down

0 comments on commit a42b66b

Please sign in to comment.