From 19906d842b8dcfa4973dbb7ee7d2c1890ec60a43 Mon Sep 17 00:00:00 2001 From: Sina Rohde <s.rohde@indiscale.com> Date: Mon, 23 Sep 2024 13:23:07 +0200 Subject: [PATCH] defined const for table data --- pages/fdo/show/[prefix]/sandbox.tsx | 2 +- src/components/fdos/details.tsx | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/pages/fdo/show/[prefix]/sandbox.tsx b/pages/fdo/show/[prefix]/sandbox.tsx index e1281ab..d7feb14 100644 --- a/pages/fdo/show/[prefix]/sandbox.tsx +++ b/pages/fdo/show/[prefix]/sandbox.tsx @@ -146,7 +146,7 @@ const ShowFDO = () => { <Avatar sx={{ bgcolor: blue[500] }} variant="rounded"> <AssignmentIcon /> </Avatar> - <Typography variant="h6" gutterBottom> {displayName} </Typography> + <Typography variant="h5" gutterBottom> {displayName} </Typography> </Stack><br/> <Details/> </Item> diff --git a/src/components/fdos/details.tsx b/src/components/fdos/details.tsx index 1dfb055..eec5620 100644 --- a/src/components/fdos/details.tsx +++ b/src/components/fdos/details.tsx @@ -20,20 +20,23 @@ const StyledTableCell = styled(TableCell)(({ theme }) => ({ ...theme.applyStyles('dark', { backgroundColor: '#262c32' }) - + } })) const StyledTableRow = styled(TableRow)(({ theme }) => ({ - '&:nth-of-type(odd)': { - backgroundColor: theme.palette.action.hover }, + '&:nth-of-type(odd)': { backgroundColor: theme.palette.action.hover }, // hide last border '&:last-child td, &:last-child th': { - border: 0 + border: 0 } })) -const info = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.' +const genInfo = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.' +const typeInfo = 'CETTS' +const repoInfo = 'LinkAhead' +const dataSpInfo = 'RWTH' +const techInfo = 'EDC' function createData ( category: string, @@ -45,11 +48,11 @@ function createData ( } const rows = [ - createData('Desription:', info, ''), - createData('Type:', 'CETTS', 'xx'), - createData('Repository:', 'LinkAhead', 'xx'), - createData('Dataspace:', 'RWTH', 'xx'), - createData('Technology:', 'EDC', 'xx') + createData('Desription:', genInfo, ''), + createData('Type:', typeInfo, ''), + createData('Repository:', repoInfo, 'xx'), + createData('Dataspace:', dataSpInfo, 'xx'), + createData('Technology:', techInfo, 'xx') ] -- GitLab