From fa6adedc42e9c6ec39cc30df16b54900c220b094 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 20 Dec 2021 00:15:20 +0100 Subject: refactor: rewrite types and services I was repeating myself a lot in services. So I rewrited the different functions to improve readability and I extracted some formatting functions to put them in utils. I also rewrited/reorganized some types to keep consistent names. --- src/ts/types/homepage.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/ts/types/homepage.ts') diff --git a/src/ts/types/homepage.ts b/src/ts/types/homepage.ts index 404aa38..8ff2ccb 100644 --- a/src/ts/types/homepage.ts +++ b/src/ts/types/homepage.ts @@ -1,19 +1,12 @@ -export type fetchHomePageReturn = () => Promise; - -export type HomePageResponse = { - nodeByUri: { - id: string; - content: string; - }; -}; - -export type getHomePageReturn = () => Promise; - export type HomePage = { id: string; content: string; }; +export type HomePageBy = { + nodeByUri: HomePage; +}; + export type HomePageProps = { data: HomePage; }; -- cgit v1.2.3