Skip to content

Commit

Permalink
Merge pull request #22 from Decibels-UTC/fixresponsive
Browse files Browse the repository at this point in the history
little fix
  • Loading branch information
leopoldch authored Feb 18, 2024
2 parents 8031655 + 165144e commit 5cc7090
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/TableData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ function TableData() {
const [price, setPrice] = useState('Prix');
const [qte, setQte] = useState('Quantité');
const [action, setAction] = useState('Actions');
const [supp, setSuppr] = useState('Date de suppression');



useEffect(() => {
Expand All @@ -56,13 +58,15 @@ function TableData() {
setPrice("Prix");
setQte("Quantité");
setAction("Actions");
setSuppr("Date de suppression");
} else {
setSelection(<Icon name="tasks" />);
setRef(<Icon name="address card outline" />);
setPower(<Icon name="power cord" />);
setPrice(<Icon name="money" />);
setQte(<Icon name="boxes" />);
setAction(<Icon name="edit outline" />);
setSuppr(<Icon name="delete calendar" />);
}
}, [isLargeScreen]);

Expand Down Expand Up @@ -581,7 +585,7 @@ const handleDeselectButton = () => {
<TableHeaderCell sorted={column === 'quantity' ? direction : null} onClick={() => dispatch({ type: 'CHANGE_SORT', column: 'quantity' })}>{qte}</TableHeaderCell>

{isLargeScreen && <><TableHeaderCell>Modification</TableHeaderCell><TableHeaderCell sorted={column === 'creation' ? direction : null} onClick={() => dispatch({ type: 'CHANGE_SORT', column: 'creation' })}>Date d'ajout</TableHeaderCell></>}
{showDeleted ? <TableHeaderCell sorted={column === 'removed' ? direction : null} onClick={() => dispatch({ type: 'CHANGE_SORT', column: 'removed' })} >Date de suppression</TableHeaderCell> :
{showDeleted ? <TableHeaderCell sorted={column === 'removed' ? direction : null} onClick={() => dispatch({ type: 'CHANGE_SORT', column: 'removed' })} >{supp}</TableHeaderCell> :

null
}
Expand Down Expand Up @@ -637,7 +641,7 @@ const handleDeselectButton = () => {
</TableCell>
</> : null
}
{!showDeleted && userId ===2 ? <>
{!showDeleted && userId ===2 &&isLargeScreen ? <>
<TableCell>{convertDateFormat(item.modification_date)}</TableCell>
</> : null
}
Expand Down

0 comments on commit 5cc7090

Please sign in to comment.