From f861e6a269ba9f62700776d3cd13b644a9e836d4 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 20 Sep 2023 16:38:54 +0200 Subject: refactor: use named export for everything except pages Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements. --- src/services/graphql/thematics.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/services/graphql/thematics.ts') diff --git a/src/services/graphql/thematics.ts b/src/services/graphql/thematics.ts index 9210828..7a57824 100644 --- a/src/services/graphql/thematics.ts +++ b/src/services/graphql/thematics.ts @@ -1,17 +1,19 @@ -import { PageLink, Slug, Thematic } from '../../types/app'; -import { GraphQLEdgesInput } from '../../types/graphql/generics'; -import { EdgesResponse } from '../../types/graphql/queries'; import { - RawArticle, - RawThematic, - RawThematicPreview, - TotalItems, -} from '../../types/raw-data'; -import { getImageFromRawData } from '../../utils/helpers/images'; + type EdgesResponse, + type GraphQLEdgesInput, + type PageLink, + type RawArticle, + type RawThematic, + type RawThematicPreview, + type Slug, + type Thematic, + type TotalItems, +} from '../../types'; import { + getImageFromRawData, getPageLinkFromRawData, sortPageLinksByName, -} from '../../utils/helpers/pages'; +} from '../../utils/helpers'; import { fetchAPI } from './api'; import { getArticleFromRawData } from './articles'; import { -- cgit v1.2.3