refactor: move person types in interface

This commit is contained in:
Sammy Teillet 2023-04-20 15:39:56 +02:00
parent 7ade04b79e
commit b8032e9605
No known key found for this signature in database
GPG Key ID: 687E513E74D28696
5 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
import { Company } from '../../interfaces/company.interface';
import { Pipe } from '../../interfaces/pipe.interface';
import { Company } from './company.interface';
import { Pipe } from './pipe.interface';
export type Person = {
fullName: string;

View File

@ -4,7 +4,7 @@ import Table from '../../components/table/Table';
import styled from '@emotion/styled';
import { peopleColumns } from './people-table';
import { gql, useQuery } from '@apollo/client';
import { GraphqlPerson, Person } from './types';
import { GraphqlPerson, Person } from '../../interfaces/person.interface';
import { defaultData } from './default-data';
import { mapPerson } from './mapper';

View File

@ -1,4 +1,4 @@
import { Person } from './types';
import { Person } from '../../interfaces/person.interface';
export const defaultData: Array<Person> = [
{

View File

@ -1,4 +1,4 @@
import { GraphqlPerson, Person } from './types';
import { GraphqlPerson, Person } from '../../interfaces/person.interface';
export const mapPerson = (person: GraphqlPerson): Person => ({
fullName: `${person.firstname} ${person.lastname}`,

View File

@ -15,7 +15,7 @@ import Checkbox from '../../components/form/Checkbox';
import HorizontalyAlignedContainer from '../../layout/containers/HorizontalyAlignedContainer';
import CompanyChip from '../../components/chips/CompanyChip';
import PersonChip from '../../components/chips/PersonChip';
import { Person } from './types';
import { Person } from '../../interfaces/person.interface';
const columnHelper = createColumnHelper<Person>();
export const peopleColumns = [