Skip to content

Commit

Permalink
Merge pull request #809 from amitamrutiya/fix-catalog-table
Browse files Browse the repository at this point in the history
Fix some issue in the catalog design table
  • Loading branch information
amitamrutiya authored Nov 14, 2024
2 parents 4222aad + d97abce commit 46d47e2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
3 changes: 2 additions & 1 deletion src/custom/CatalogDesignTable/columnConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { MUIDataTableColumn, MUIDataTableMeta } from 'mui-datatables';
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from 'react-share';
import { Avatar, Box, Grid, Typography } from '../../base';
import { CLOUD_URL } from '../../constants/constants';
import { iconMedium } from '../../constants/iconsSizes';
import {
ChainIcon,
Expand Down Expand Up @@ -165,7 +166,7 @@ export const createDesignColumns = ({
alt={displayName}
src={avatar_url}
onClick={() => {
window.location.href = `/user/${user_id}`;
window.open(`${CLOUD_URL}/user/${user_id}`, '_blank');
}}
>
{!avatar_url && <PersonIcon />}
Expand Down
9 changes: 5 additions & 4 deletions src/custom/ResponsiveDataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ export const DataTableEllipsisMenu: React.FC<{
const dataTableTheme = (theme: Theme, backgroundColor?: string) =>
createTheme({
components: {
MUIDataTable: {
MuiPaper: {
styleOverrides: {
paper: {
root: {
background: backgroundColor || theme.palette.background.default,
maxWidth: '-moz-available'
maxWidth: '-moz-available',
width: '-moz-available'
}
}
},
Expand Down Expand Up @@ -386,7 +387,7 @@ const ResponsiveDataTable = ({
});
updateCols && updateCols([...columns]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [columnVisibility, updateCols]);
}, [columnVisibility, updateCols, data]);

React.useEffect(() => {
updateColumnsEffect();
Expand Down
30 changes: 16 additions & 14 deletions src/custom/TooltipIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@ export function TooltipIcon({
}: TooltipIconProps): JSX.Element {
return (
<CustomTooltip title={title} arrow={arrow}>
<IconButton
onClick={onClick}
sx={{
'&:hover': {
'& svg': {
fill: '#00d3a9'
<div>
<IconButton
onClick={onClick}
sx={{
'&:hover': {
'& svg': {
fill: '#00d3a9'
},
borderRadius: '4px'
},
borderRadius: '4px'
},
...(style as SxProps)
}}
disableRipple
>
{icon}
</IconButton>
...(style as SxProps)
}}
disableRipple
>
{icon}
</IconButton>
</div>
</CustomTooltip>
);
}
Expand Down

0 comments on commit 46d47e2

Please sign in to comment.