generated from YashTotale/boilerplate-react-with-redux-and-firebase
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.ts
44 lines (35 loc) · 1.08 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// External Imports
import { Asset } from "contentful";
// Data Imports
import main from "../../Data/main.json";
// Internal Imports
import { Main } from "../types";
import { getAsset } from "./assets";
export const getMain = (): Main => {
return main as unknown as Main;
};
export const getDescription = (): Main["description"] => {
const main = getMain();
return main.description;
};
export const getDefaultSortedExperience = (): Main["sortedExperience"] => {
const main = getMain();
return main.sortedExperience;
};
export const getDefaultSortedEducation = (): Main["sortedEducation"] => {
const main = getMain();
return main.sortedEducation;
};
export const getDefaultSortedProjects = (): Main["sortedProjects"] => {
const main = getMain();
return main.sortedProjects;
};
export const getDefaultSortedArticles = (): Main["sortedArticles"] => {
const main = getMain();
return main.sortedArticles;
};
export const getDefaultEducationImage = (): Asset["fields"] => {
const main = getMain();
const educationImage = getAsset(main.educationImage);
return educationImage;
};