Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove crowdloan page #747

Merged
merged 10 commits into from
Jun 26, 2024
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,6 @@ are generated in `gatsby-node.ts`. The pages text content is stored in markdown

---

## Crowdloan Pages

Both crowdloan pages

- `/parachain/crowdloan`
- `/altair/crowdloan`

are generated in `gatsby-node.ts`. Most of their content is static because the auctions are closed already. The routes are taken over from the former site to keep urls alive.

---

## GraphQL Fragments

Queries of component data are defined inside the component file. To be able to spread them into the page query, they are exported as fragments.
Expand Down
64 changes: 0 additions & 64 deletions data/crowdloan/altair.json

This file was deleted.

69 changes: 0 additions & 69 deletions data/crowdloan/parachain.json

This file was deleted.

2 changes: 0 additions & 2 deletions functions/esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ esbuild
'functions/index.ts',
'functions/src/getExample.ts',
'functions/src/getLeverPositions.ts',
'functions/src/createProof.ts',
'functions/src/getRewardData.ts',
'functions/src/getPoolsData.ts',
'functions/src/getTotalAssetsTokenized.ts',
],
Expand Down
38 changes: 0 additions & 38 deletions functions/src/createProof.ts

This file was deleted.

28 changes: 0 additions & 28 deletions functions/src/getRewardData.ts

This file was deleted.

15 changes: 4 additions & 11 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { GatsbyNode } from 'gatsby'
import path from 'path'

export const createPages: GatsbyNode['createPages'] = async ({ actions: { createPage } }) => {
export const createPages: GatsbyNode['createPages'] = async ({ actions: { createPage, createRedirect } }) => {
try {
const legalPages = ['/imprint', '/terms', '/security', '/data-privacy-policy']

Expand All @@ -15,16 +15,9 @@ export const createPages: GatsbyNode['createPages'] = async ({ actions: { create
})
})

const crowdloanPages = ['/altair', '/parachain']

crowdloanPages.forEach((route) => {
createPage({
path: `${route}/crowdloan`,
component: path.resolve('./src/templates/crowdloan.tsx'),
context: {
slug: route,
},
})
createRedirect({
fromPath: `/parachain/crowdloan`,
toPath: `/`,
})
} catch (err) {
console.log('error', err)
Expand Down
60 changes: 0 additions & 60 deletions src/components/StatsCrowdloan.tsx

This file was deleted.

Loading
Loading