aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts/types/homepage.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-20 00:15:20 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-20 00:15:20 +0100
commitfa6adedc42e9c6ec39cc30df16b54900c220b094 (patch)
tree6bb498beadaa382245cecb86ce56931580313c6f /src/ts/types/homepage.ts
parent2ff898626c5c0abc6b8195224067b992403e313b (diff)
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.
Diffstat (limited to 'src/ts/types/homepage.ts')
-rw-r--r--src/ts/types/homepage.ts15
1 files changed, 4 insertions, 11 deletions
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<HomePageResponse>;
-
-export type HomePageResponse = {
- nodeByUri: {
- id: string;
- content: string;
- };
-};
-
-export type getHomePageReturn = () => Promise<HomePage>;
-
export type HomePage = {
id: string;
content: string;
};
+export type HomePageBy = {
+ nodeByUri: HomePage;
+};
+
export type HomePageProps = {
data: HomePage;
};