refactor: rename CellLink to ClickableCell
This commit is contained in:
@ -8,8 +8,8 @@ type OwnProps = {
|
|||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
function CellLink({ href, children }: OwnProps) {
|
function ClickableCell({ href, children }: OwnProps) {
|
||||||
return <Link to={href}>{children}</Link>;
|
return <Link to={href}>{children}</Link>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CellLink;
|
export default ClickableCell;
|
||||||
@ -12,7 +12,7 @@ import { Company } from '../../interfaces/company.interface';
|
|||||||
import { Pipe } from '../../interfaces/pipe.interface';
|
import { Pipe } from '../../interfaces/pipe.interface';
|
||||||
import { createColumnHelper } from '@tanstack/react-table';
|
import { createColumnHelper } from '@tanstack/react-table';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import CellLink from '../../components/table/CellLink';
|
import ClickableCell from '../../components/table/ClickableCell';
|
||||||
import ColumnHead from '../../components/table/ColumnHead';
|
import ColumnHead from '../../components/table/ColumnHead';
|
||||||
import personPlaceholder from './placeholder.png';
|
import personPlaceholder from './placeholder.png';
|
||||||
import { parsePhoneNumber, CountryCode } from 'libphonenumber-js';
|
import { parsePhoneNumber, CountryCode } from 'libphonenumber-js';
|
||||||
@ -113,7 +113,7 @@ const columns = [
|
|||||||
id={`person-selected-${props.row.original.email}`}
|
id={`person-selected-${props.row.original.email}`}
|
||||||
name={`person-selected${props.row.original.email}`}
|
name={`person-selected${props.row.original.email}`}
|
||||||
/>
|
/>
|
||||||
<CellLink
|
<ClickableCell
|
||||||
name={props.row.original.fullName}
|
name={props.row.original.fullName}
|
||||||
picture={props.row.original.picture}
|
picture={props.row.original.picture}
|
||||||
href="#"
|
href="#"
|
||||||
@ -122,7 +122,7 @@ const columns = [
|
|||||||
name={props.row.original.fullName}
|
name={props.row.original.fullName}
|
||||||
picture={props.row.original.picture}
|
picture={props.row.original.picture}
|
||||||
/>
|
/>
|
||||||
</CellLink>
|
</ClickableCell>
|
||||||
</HorizontalyAlignedContainer>
|
</HorizontalyAlignedContainer>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
@ -137,7 +137,7 @@ const columns = [
|
|||||||
columnHelper.accessor('company', {
|
columnHelper.accessor('company', {
|
||||||
header: () => <ColumnHead viewName="Company" viewIcon={faBuildings} />,
|
header: () => <ColumnHead viewName="Company" viewIcon={faBuildings} />,
|
||||||
cell: (props) => (
|
cell: (props) => (
|
||||||
<CellLink
|
<ClickableCell
|
||||||
name={props.row.original.fullName}
|
name={props.row.original.fullName}
|
||||||
picture={props.row.original.picture}
|
picture={props.row.original.picture}
|
||||||
href="#"
|
href="#"
|
||||||
@ -146,7 +146,7 @@ const columns = [
|
|||||||
name={props.row.original.company.name}
|
name={props.row.original.company.name}
|
||||||
picture={`https://www.google.com/s2/favicons?domain=${props.row.original.company.domain}&sz=256`}
|
picture={`https://www.google.com/s2/favicons?domain=${props.row.original.company.domain}&sz=256`}
|
||||||
/>
|
/>
|
||||||
</CellLink>
|
</ClickableCell>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor('phone', {
|
columnHelper.accessor('phone', {
|
||||||
@ -177,7 +177,7 @@ const columns = [
|
|||||||
columnHelper.accessor('pipe', {
|
columnHelper.accessor('pipe', {
|
||||||
header: () => <ColumnHead viewName="Pipe" viewIcon={faRectangleList} />,
|
header: () => <ColumnHead viewName="Pipe" viewIcon={faRectangleList} />,
|
||||||
cell: (props) => (
|
cell: (props) => (
|
||||||
<CellLink
|
<ClickableCell
|
||||||
name={props.row.original.fullName}
|
name={props.row.original.fullName}
|
||||||
picture={props.row.original.picture}
|
picture={props.row.original.picture}
|
||||||
href="#"
|
href="#"
|
||||||
@ -186,7 +186,7 @@ const columns = [
|
|||||||
name={props.row.original.pipe.name}
|
name={props.row.original.pipe.name}
|
||||||
picture={props.row.original.pipe.icon}
|
picture={props.row.original.pipe.icon}
|
||||||
/>
|
/>
|
||||||
</CellLink>
|
</ClickableCell>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor('city', {
|
columnHelper.accessor('city', {
|
||||||
|
|||||||
Reference in New Issue
Block a user