From 73ad43fe7dfeb26fdf354522eae1cfe87a08e7bb Mon Sep 17 00:00:00 2001 From: DrMint Date: Thu, 31 Mar 2022 15:01:44 +0200 Subject: [PATCH] Prettier --- graphql-codegen.js | 5 ++++- src/components/AppLayout.tsx | 8 +++----- src/graphql/operations/getPost.graphql | 2 +- src/graphql/sdk.ts | 4 ++-- src/pages/library/index.tsx | 4 ++-- src/pages/merch/index.tsx | 8 +------- 6 files changed, 13 insertions(+), 18 deletions(-) diff --git a/graphql-codegen.js b/graphql-codegen.js index 87f6dda..16b99f3 100644 --- a/graphql-codegen.js +++ b/graphql-codegen.js @@ -8,7 +8,10 @@ module.exports = { headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` }, }, }, - documents: ["src/graphql/operations/*.graphql", "src/graphql/fragments/*.graphql"], + documents: [ + "src/graphql/operations/*.graphql", + "src/graphql/fragments/*.graphql", + ], generates: { "src/graphql/generated.ts": { plugins: [ diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 7fd9685..ce78812 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -79,7 +79,8 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element { const currencyOptions: string[] = []; currencies.map((currency) => { - if (currency.attributes?.code) currencyOptions.push(currency.attributes.code); + if (currency.attributes?.code) + currencyOptions.push(currency.attributes.code); }); const [currencySelect, setCurrencySelect] = useState(-1); @@ -132,10 +133,7 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element { > - + diff --git a/src/graphql/operations/getPost.graphql b/src/graphql/operations/getPost.graphql index 86123a6..c407296 100644 --- a/src/graphql/operations/getPost.graphql +++ b/src/graphql/operations/getPost.graphql @@ -58,4 +58,4 @@ query getPost($slug: String, $language_code: String) { } } } -} \ No newline at end of file +} diff --git a/src/graphql/sdk.ts b/src/graphql/sdk.ts index ca17593..9b05ba5 100644 --- a/src/graphql/sdk.ts +++ b/src/graphql/sdk.ts @@ -1,9 +1,9 @@ import { GraphQLClient } from "graphql-request"; -import { getSdk, UploadFile } from "graphql/generated"; +import { getSdk } from "graphql/generated"; export function getReadySdk() { const client = new GraphQLClient(process.env.URL_GRAPHQL ?? "", { headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` }, }); return getSdk(client); -} \ No newline at end of file +} diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index d606ecc..5646bc2 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -304,12 +304,12 @@ function getGroups( years.map((year) => { group.set(year.toString(), []); }); - group.set(langui.no_year || "No year", []); + group.set(langui.no_year ?? "No year", []); items.map((item) => { if (item.attributes?.release_date?.year) { group.get(item.attributes.release_date.year.toString())?.push(item); } else { - group.get(langui.no_year || "No year")?.push(item); + group.get(langui.no_year ?? "No year")?.push(item); } }); diff --git a/src/pages/merch/index.tsx b/src/pages/merch/index.tsx index e018d24..1a70a06 100644 --- a/src/pages/merch/index.tsx +++ b/src/pages/merch/index.tsx @@ -17,13 +17,7 @@ export default function Merch(props: MerchProps): JSX.Element { ); - return ( - - ); + return ; } export async function getStaticProps(