Reorganize frontend and install Craco to alias modules (#190)
This commit is contained in:
@ -1,11 +1,13 @@
|
||||
import { graphql } from 'msw';
|
||||
import { filterAndSortData, updateOneFromData } from './mock-data';
|
||||
import { GraphqlQueryCompany } from '../interfaces/entities/company.interface';
|
||||
|
||||
import { GraphqlQueryCompany } from '@/companies/interfaces/company.interface';
|
||||
import { GraphqlQueryPerson } from '@/people/interfaces/person.interface';
|
||||
import { GraphqlQueryUser } from '@/users/interfaces/user.interface';
|
||||
|
||||
import { mockedCompaniesData } from './mock-data/companies';
|
||||
import { GraphqlQueryUser } from '../interfaces/entities/user.interface';
|
||||
import { mockedUsersData } from './mock-data/users';
|
||||
import { mockedPeopleData } from './mock-data/people';
|
||||
import { GraphqlQueryPerson } from '../interfaces/entities/person.interface';
|
||||
import { mockedUsersData } from './mock-data/users';
|
||||
import { filterAndSortData, updateOneFromData } from './mock-data';
|
||||
|
||||
export const graphqlMocks = [
|
||||
graphql.query('GetCompanies', (req, res, ctx) => {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { GraphqlQueryCompany } from '../../interfaces/entities/company.interface';
|
||||
import { GraphqlQueryCompany } from '@/companies/interfaces/company.interface';
|
||||
|
||||
export const mockedCompaniesData: Array<GraphqlQueryCompany> = [
|
||||
{
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
import { GraphQLVariables } from 'msw';
|
||||
|
||||
import { Company } from '@/companies/interfaces/company.interface';
|
||||
import { Person } from '@/people/interfaces/person.interface';
|
||||
import { User } from '@/users/interfaces/user.interface';
|
||||
import { BoolExpType } from '@/utils/interfaces/generic.interface';
|
||||
import {
|
||||
CompanyOrderByWithRelationInput,
|
||||
PersonOrderByWithRelationInput,
|
||||
StringFilter,
|
||||
UserOrderByWithRelationInput,
|
||||
} from '../../generated/graphql';
|
||||
import { Company } from '../../interfaces/entities/company.interface';
|
||||
import { BoolExpType } from '../../interfaces/entities/generic.interface';
|
||||
import { Person } from '../../interfaces/entities/person.interface';
|
||||
import { User } from '../../interfaces/entities/user.interface';
|
||||
} from '~/generated/graphql';
|
||||
|
||||
function filterData<DataT>(
|
||||
data: Array<DataT>,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { GraphqlQueryPerson } from '../../interfaces/entities/person.interface';
|
||||
import { GraphqlQueryPerson } from '@/people/interfaces/person.interface';
|
||||
|
||||
export const mockedPeopleData = [
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { GraphqlQueryUser } from '../../interfaces/entities/user.interface';
|
||||
import { GraphqlQueryUser } from '@/users/interfaces/user.interface';
|
||||
|
||||
export const mockedUsersData: Array<GraphqlQueryUser> = [
|
||||
{
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { FullHeightStorybookLayout } from './FullHeightStorybookLayout';
|
||||
import { ThemeProvider } from '@emotion/react';
|
||||
import { ApolloProvider } from '@apollo/client';
|
||||
import { RecoilRoot } from 'recoil';
|
||||
import { mockedClient } from './mockedClient';
|
||||
import { lightTheme } from '../layout/styles/themes';
|
||||
import React from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ApolloProvider } from '@apollo/client';
|
||||
import { ThemeProvider } from '@emotion/react';
|
||||
import { RecoilRoot } from 'recoil';
|
||||
|
||||
import { lightTheme } from '@/ui/layout/styles/themes';
|
||||
|
||||
import { ComponentStorybookLayout } from './ComponentStorybookLayout';
|
||||
import { FullHeightStorybookLayout } from './FullHeightStorybookLayout';
|
||||
import { mockedClient } from './mockedClient';
|
||||
|
||||
export function getRenderWrapperForPage(children: React.ReactElement) {
|
||||
return function render() {
|
||||
|
||||
Reference in New Issue
Block a user