This commit is contained in:
DrMint 2022-03-31 15:01:44 +02:00
parent 125421de0f
commit 73ad43fe7d
6 changed files with 13 additions and 18 deletions

View File

@ -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: [

View File

@ -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<number>(-1);
@ -132,10 +133,7 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element {
></meta>
<meta name="description" content={metaDescription} />
<meta
name="twitter:description"
content={metaDescription}
></meta>
<meta name="twitter:description" content={metaDescription}></meta>
<meta property="og:image" content={metaImage.image}></meta>
<meta property="og:image:secure_url" content={metaImage.image}></meta>

View File

@ -1,5 +1,5 @@
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 ?? "", {

View File

@ -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);
}
});

View File

@ -17,13 +17,7 @@ export default function Merch(props: MerchProps): JSX.Element {
</SubPanel>
);
return (
<AppLayout
navTitle={langui.merch}
subPanel={subPanel}
{...props}
/>
);
return <AppLayout navTitle={langui.merch} subPanel={subPanel} {...props} />;
}
export async function getStaticProps(