Skip to content

Commit

Permalink
fix: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
martapanc committed Aug 22, 2023
1 parent eec597a commit ef1254c
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/app/(public)/about/work/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,41 +38,31 @@ async function queryIntro() {
}

async function queryJobs() {
const { data } = await apolloClient.query({
query: jobsQueryQL,
});
const { data } = await apolloClient.query({ query: jobsQueryQL });

return flattenToArray<Job>(data.jobs);
}

async function queryPublications() {
const { data } = await apolloClient.query({
query: publicationQueryQL,
});
const { data } = await apolloClient.query({ query: publicationQueryQL });

return flattenToArray<Publication>(data.publications);
}

async function querySchools() {
const { data } = await apolloClient.query({
query: schoolsQueryQL,
});
const { data } = await apolloClient.query({ query: schoolsQueryQL });

return flattenToArray<School>(data.schools);
}

async function querySkills() {
const { data } = await apolloClient.query({
query: skillQueryQL,
});
const { data } = await apolloClient.query({ query: skillQueryQL });

return flattenToArray<Skill>(data.skills);
}

async function queryLanguages() {
const { data } = await apolloClient.query({
query: languagesQueryQL,
});
const { data } = await apolloClient.query({ query: languagesQueryQL });

return flattenToArray<Language>(data.languages);
}
Expand Down Expand Up @@ -100,7 +90,7 @@ const AboutPage = async () => {
const { intro, jobs, languages, publications, schools, skills } =
await queryData();

const noOfYears = new Date().getFullYear() - 2015;
const noOfYears = (new Date().getFullYear() - 2015).toString();

const iconDimension = 36;
const titleIconDimension = 42;
Expand Down

0 comments on commit ef1254c

Please sign in to comment.