forked from polkassembly/polkassembly
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f3954da
Showing
634 changed files
with
103,849 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true | ||
}, | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/eslint-recommended" | ||
], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"header", | ||
"promise", | ||
"react", | ||
"react-hooks" | ||
], | ||
"settings": { | ||
"react": { | ||
"pragma": "React", // Pragma to use, default to "React" | ||
"version": "18.2.0" // React version, default to the latest React stable release | ||
} | ||
}, | ||
"rules": { | ||
"react/react-in-jsx-scope": "off", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"arrow-spacing":["warn",{ "before": true, "after": true }], | ||
"comma-dangle": ["error", "never"], | ||
"header/header": [2, "./header.js"], | ||
"indent": ["error", "tab"], | ||
"no-multiple-empty-lines": ["error", {"max": 1}], | ||
"no-tabs": ["error", { "allowIndentationTabs": true }], | ||
"no-trailing-spaces": ["warn"], | ||
"no-unused-vars": "off", | ||
"object-curly-spacing": ["error", "always"], | ||
"quotes": ["error", "single", { "avoidEscape": true }], | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"semi": [2, "always"], | ||
// "simple-import-sort/imports": "error", | ||
"sort-keys": ["error", "asc", {"caseSensitive": true, "natural": false, "minKeys": 2}], | ||
"switch-colon-spacing": ["error", {"after": true, "before": false}] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
.vscode | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# Sentry | ||
.sentryclirc | ||
|
||
# Sentry | ||
next.config.original.js | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Security Policy | ||
|
||
## Reporting a Vulnerability | ||
|
||
Contact: mailto:[email protected] | ||
Encryption: https://kusama.polkassembly.io/pgp-key.txt | ||
Preferred-Languages: en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2019-2025 @polkassembly/polkassembly authors & contributors | ||
// This software may be modified and distributed under the terms | ||
// of the Apache-2.0 license. See the LICENSE file for details. | ||
|
||
import dayjs from 'dayjs'; | ||
import duration from 'dayjs/plugin/duration'; | ||
import isBetween from 'dayjs/plugin/isBetween'; | ||
import relativeTime from 'dayjs/plugin/relativeTime'; | ||
import utc from 'dayjs/plugin/utc'; | ||
|
||
dayjs.extend(duration); | ||
dayjs.extend(isBetween); | ||
dayjs.extend(relativeTime); | ||
dayjs.extend(utc); | ||
|
||
export { | ||
dayjs | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Copyright 2019-2025 @polkassembly/polkassembly authors & contributors | ||
// This software may be modified and distributed under the terms | ||
// of the Apache-2.0 license. See the LICENSE file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright 2019-2025 @polkassembly/polkassembly authors & contributors | ||
// This software may be modified and distributed under the terms | ||
// of the Apache-2.0 license. See the LICENSE file for details. | ||
|
||
declare module '@metamask/jazzicon' { | ||
export default function (diameter: number, seed: number): HTMLElement; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright 2019-2025 @polkassembly/polkassembly authors & contributors | ||
// This software may be modified and distributed under the terms | ||
// of the Apache-2.0 license. See the LICENSE file for details. | ||
/* eslint-disable indent */ | ||
|
||
/* eslint-disable sort-keys */ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
async headers() { | ||
return [ | ||
{ | ||
// matching all v1 API routes | ||
source: '/api/:path*', | ||
headers: [ | ||
{ key: 'Access-Control-Allow-Credentials', value: 'true' }, | ||
{ key: 'Access-Control-Allow-Origin', value: '*' }, | ||
{ key: 'Access-Control-Allow-Methods', value: 'GET,OPTIONS,PATCH,DELETE,POST,PUT' }, | ||
{ key: 'Access-Control-Allow-Headers', value: '*' } | ||
] | ||
} | ||
]; | ||
}, | ||
async redirects() { | ||
return [ | ||
{ | ||
source: '/news', // this path will be redirected to 404 | ||
destination: '/404', | ||
permanent: true | ||
} | ||
]; | ||
}, | ||
images: { | ||
domains: ['parachains.info'] | ||
}, | ||
reactStrictMode: true, | ||
compiler: { | ||
styledComponents: true | ||
}, | ||
webpack(config) { | ||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
use: ['@svgr/webpack'] | ||
}); | ||
|
||
return config; | ||
} | ||
}; | ||
|
||
module.exports = nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"name": "polkassembly-nextjs", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint", | ||
"lint:fix": "next lint --fix", | ||
"api:bump": "yarn add @polkadot/api @polkadot/api-augment @polkadot/extension-dapp @polkadot/extension-inject @polkadot/react-identicon @polkadot/ui-settings @polkadot/util @polkadot/util-crypto" | ||
}, | ||
"dependencies": { | ||
"@apollo/client": "^3.7.3", | ||
"@ardatan/graphql-tools": "^4.1.0", | ||
"@metamask/jazzicon": "^2.0.0", | ||
"@next/font": "^13.1.6", | ||
"@polkadot/api": "^9.13.6", | ||
"@polkadot/api-augment": "^9.13.6", | ||
"@polkadot/extension-dapp": "^0.44.8", | ||
"@polkadot/extension-inject": "^0.44.8", | ||
"@polkadot/react-identicon": "^2.11.1", | ||
"@polkadot/ui-settings": "^2.11.1", | ||
"@polkadot/util": "^10.3.1", | ||
"@polkadot/util-crypto": "^10.3.1", | ||
"@sendgrid/mail": "^7.7.0", | ||
"@tinymce/tinymce-react": "^4.2.0", | ||
"@types/jsonwebtoken": "^8.5.9", | ||
"@types/node": "18.11.17", | ||
"@types/react": "18.0.26", | ||
"@types/react-dom": "18.0.9", | ||
"@types/redis": "^4.0.11", | ||
"@types/uuid": "^9.0.0", | ||
"@types/validator": "^13.7.10", | ||
"@typescript-eslint/eslint-plugin": "^5.47.0", | ||
"@typescript-eslint/parser": "^5.47.0", | ||
"@walletconnect/web3-provider": "^1.8.0", | ||
"antd": "^5.0.7", | ||
"argon2": "^0.30.3", | ||
"bn.js": "^5.2.1", | ||
"classnames": "^2.3.2", | ||
"cookie": "^0.5.0", | ||
"dayjs": "^1.11.7", | ||
"detect-browser": "^5.3.0", | ||
"ejs": "^3.1.8", | ||
"eslint": "8.30.0", | ||
"eslint-config-next": "13.0.7", | ||
"eslint-config-standard": "^17.0.0", | ||
"eslint-plugin-header": "^3.1.1", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"eslint-plugin-react": "^7.31.11", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-simple-import-sort": "^8.0.0", | ||
"eslint-plugin-standard": "^5.0.0", | ||
"eth-sig-util": "^3.0.1", | ||
"firebase-admin": "^11.4.1", | ||
"graphql": "^16.6.0", | ||
"graphql-tag": "^2.12.6", | ||
"graphql-toolkit": "^0.7.5", | ||
"ioredis": "^5.3.0", | ||
"jsonwebtoken": "^8.5.1", | ||
"lodash": "^4.17.21", | ||
"next": "13.0.7", | ||
"nextjs-progressbar": "^0.0.16", | ||
"node-fetch": "^3.3.0", | ||
"query-string": "^8.1.0", | ||
"react": "18.2.0", | ||
"react-big-calendar": "^1.6.8", | ||
"react-cmdk": "^1.3.8", | ||
"react-date-picker": "^9.1.0", | ||
"react-dom": "18.2.0", | ||
"react-helmet": "^6.1.0", | ||
"react-json-view": "^1.21.3", | ||
"react-jwt": "^1.1.7", | ||
"react-markdown": "^8.0.4", | ||
"react-mde": "^11.5.0", | ||
"react-minimal-pie-chart": "^8.4.0", | ||
"react-twitter-embed": "^4.0.4", | ||
"rehype-raw": "^6.1.1", | ||
"showdown": "^2.1.0", | ||
"styled-components": "^5.3.6", | ||
"typescript": "4.9.4", | ||
"uuid": "^9.0.0", | ||
"validator": "^13.7.0", | ||
"web3": "~1.6.1" | ||
}, | ||
"devDependencies": { | ||
"@svgr/webpack": "^6.5.1", | ||
"@types/cookie": "^0.5.1", | ||
"@types/ejs": "^3.1.1", | ||
"@types/lodash": "^4.14.191", | ||
"@types/react-big-calendar": "^1.6.1", | ||
"@types/react-helmet": "^6.1.6", | ||
"@types/showdown": "^2.0.0", | ||
"@types/styled-components": "^5.1.26", | ||
"autoprefixer": "^10.4.13", | ||
"postcss": "^8.4.20", | ||
"tailwindcss": "^3.2.4" | ||
}, | ||
"resolutions": { | ||
"styled-components": "^5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2019-2025 @polkassembly/polkassembly authors & contributors | ||
// This software may be modified and distributed under the terms | ||
// of the Apache-2.0 license. See the LICENSE file for details. | ||
|
||
import { Result } from 'antd'; | ||
import Link from 'next/link'; | ||
import React from 'react'; | ||
|
||
import NothingFoundSVG from '~assets/nothing-found.svg'; | ||
|
||
const NotFound = () => { | ||
return ( | ||
<Result | ||
icon={ | ||
<div className='w-1/2 h-auto mx-auto max-w-[900px]'> | ||
<NothingFoundSVG /> | ||
</div> | ||
} | ||
title="Uh oh, it seems this route doesn't exist." | ||
extra={ | ||
<Link href='/' className='py-2 px-6 bg-pink_primary text-white border-white hover:bg-pink_secondary rounded-md text-lg h-[50px] w-[215px]'> | ||
Go To Home | ||
</Link> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export default NotFound; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2019-2025 @polkassembly/polkassembly authors & contributors | ||
// This software may be modified and distributed under the terms | ||
// of the Apache-2.0 license. See the LICENSE file for details. | ||
|
||
import { Result } from 'antd'; | ||
import Link from 'next/link'; | ||
import React from 'react'; | ||
|
||
const NotFound = () => { | ||
return ( | ||
<Result | ||
title="Uh oh, something went wrong." | ||
extra={ | ||
<Link href='/' className='py-2 px-6 bg-pink_primary text-white border-white hover:bg-pink_secondary rounded-md text-lg h-[50px] w-[215px]'> | ||
Go To Home | ||
</Link> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export default NotFound; |
Oops, something went wrong.