Skip to content

Commit

Permalink
Remove crowdloan page
Browse files Browse the repository at this point in the history
  • Loading branch information
hieronx committed Jun 25, 2024
1 parent 1a43c69 commit 2510cfc
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 669 deletions.
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.

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

0 comments on commit 2510cfc

Please sign in to comment.