refactor: rename CellLink to ClickableCell

This commit is contained in:
Sammy Teillet
2023-04-19 12:24:25 +02:00
parent 3696bf2617
commit 5962140656
2 changed files with 9 additions and 9 deletions

View File

@ -8,8 +8,8 @@ type OwnProps = {
children?: React.ReactNode;
};
function CellLink({ href, children }: OwnProps) {
function ClickableCell({ href, children }: OwnProps) {
return <Link to={href}>{children}</Link>;
}
export default CellLink;
export default ClickableCell;

View File

@ -12,7 +12,7 @@ import { Company } from '../../interfaces/company.interface';
import { Pipe } from '../../interfaces/pipe.interface';
import { createColumnHelper } from '@tanstack/react-table';
import styled from '@emotion/styled';
import CellLink from '../../components/table/CellLink';
import ClickableCell from '../../components/table/ClickableCell';
import ColumnHead from '../../components/table/ColumnHead';
import personPlaceholder from './placeholder.png';
import { parsePhoneNumber, CountryCode } from 'libphonenumber-js';
@ -113,7 +113,7 @@ const columns = [
id={`person-selected-${props.row.original.email}`}
name={`person-selected${props.row.original.email}`}
/>
<CellLink
<ClickableCell
name={props.row.original.fullName}
picture={props.row.original.picture}
href="#"
@ -122,7 +122,7 @@ const columns = [
name={props.row.original.fullName}
picture={props.row.original.picture}
/>
</CellLink>
</ClickableCell>
</HorizontalyAlignedContainer>
),
}),
@ -137,7 +137,7 @@ const columns = [
columnHelper.accessor('company', {
header: () => <ColumnHead viewName="Company" viewIcon={faBuildings} />,
cell: (props) => (
<CellLink
<ClickableCell
name={props.row.original.fullName}
picture={props.row.original.picture}
href="#"
@ -146,7 +146,7 @@ const columns = [
name={props.row.original.company.name}
picture={`https://www.google.com/s2/favicons?domain=${props.row.original.company.domain}&sz=256`}
/>
</CellLink>
</ClickableCell>
),
}),
columnHelper.accessor('phone', {
@ -177,7 +177,7 @@ const columns = [
columnHelper.accessor('pipe', {
header: () => <ColumnHead viewName="Pipe" viewIcon={faRectangleList} />,
cell: (props) => (
<CellLink
<ClickableCell
name={props.row.original.fullName}
picture={props.row.original.picture}
href="#"
@ -186,7 +186,7 @@ const columns = [
name={props.row.original.pipe.name}
picture={props.row.original.pipe.icon}
/>
</CellLink>
</ClickableCell>
),
}),
columnHelper.accessor('city', {