Skip to content

Commit

Permalink
feat(frontend): add api (#16)
Browse files Browse the repository at this point in the history
* feat(frontend): add api
* feat(frontend): text
* feat(frontend): loading
* chore(frontend): dependencies
* chore: pnpm lock
  • Loading branch information
JaydenXu-BTC authored Jul 29, 2024
1 parent ebf4d41 commit 4741dc3
Show file tree
Hide file tree
Showing 103 changed files with 10,333 additions and 8,944 deletions.
20 changes: 3 additions & 17 deletions frontend/cspell.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
{
"version": "0.1",
"language": "en",
"words": [
"utxo",
"rgbpp",
"nervos",
"nums"
],
"ignoreWords": [
"lingui",
"pandacss",
"outdir",
"txns",
"svgr",
"deepmerge",
"usehooks",
"hstack"
],
"words": ["utxo", "rgbpp", "nervos", "nums", "xudt", "bignumber", "pageable", "locktime"],
"ignoreWords": ["lingui", "pandacss", "outdir", "txns", "svgr", "deepmerge", "usehooks", "hstack", "cellbase", "scriptpubkey", "satoshi", "vout", "vin", "scriptsig", "prevout", "nervosnetwork", "bitcoinjs", "wpkh", "shannons"],
"ignorePaths": [
"pnpm-lock.yaml",
"package.json",
Expand All @@ -31,4 +17,4 @@
"styled-system",
"src/assets/**"
]
}
}
12 changes: 6 additions & 6 deletions frontend/lingui.config.mjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/** @type {import('@lingui/conf').LinguiConfig} */
const linguiConfig = {
locales: ["en"],
sourceLocale: "en",
locales: ['en'],
sourceLocale: 'en',
catalogs: [
{
path: "<rootDir>/src/locales/{locale}/messages",
include: ["src"],
path: '<rootDir>/src/locales/{locale}/messages',
include: ['src'],
},
],
format: "po",
format: 'po',
compileNamespace: 'ts',
}

export default linguiConfig;
export default linguiConfig
14 changes: 6 additions & 8 deletions frontend/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
const nextConfig = {
reactStrictMode: true,
experimental: {
swcPlugins: [["@lingui/swc-plugin", {}]],
swcPlugins: [['@lingui/swc-plugin', {}]],
esmExternals: true,
gzipSize: true,
},
webpack(config) {
const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.('.svg'),
)
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.('.svg'))
config.module.rules.push(
{
...fileLoaderRule,
Expand Down Expand Up @@ -37,15 +35,15 @@ const nextConfig = {
));
${variables.exports};`
}
}
},
},
},
],
},
)
fileLoaderRule.exclude = /\.svg$/i
return config
},
};
}

export default nextConfig;
export default nextConfig
10 changes: 9 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@
"@lingui/core": "^4.11.2",
"@lingui/macro": "^4.11.2",
"@lingui/react": "^4.11.2",
"@nervosnetwork/ckb-sdk-utils": "^0.109.2",
"@tanstack/react-query": "^5.51.11",
"axios": "^1.7.2",
"bignumber.js": "^9.1.2",
"bitcoinjs-lib": "^6.1.6",
"dayjs": "^1.11.12",
"graphql-request": "^7.1.0",
"lodash-es": "^4.17.21",
"negotiator": "^0.6.3",
"next": "14.2.4",
"react": "^18",
"react-dom": "^18",
"usehooks-ts": "^3.1.0"
"usehooks-ts": "^3.1.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@lingui/cli": "^4.11.2",
Expand All @@ -35,6 +42,7 @@
"@park-ui/panda-preset": "^0.38.1",
"@svgr/core": "^8.1.0",
"@svgr/webpack": "^8.1.0",
"@types/lodash-es": "^4.17.12",
"@types/negotiator": "^0.6.3",
"@types/node": "^20",
"@types/react": "^18",
Expand Down
13 changes: 13 additions & 0 deletions frontend/panda.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ export default defineConfig({
exclude: [],
theme: {
extend: {
keyframes: {
'steps-x': {
'0%': {
transform: 'translateX(0)',
},
'100%': {
transform: 'translateX(var(--steps-offset-x))',
},
},
},
recipes: {
button,
iconButton,
Expand Down Expand Up @@ -80,6 +90,9 @@ export default defineConfig({
a10: {
value: 'rgba(15,240,130,0.1)',
},
unspent: {
value: '#14E17D',
},
},
border: {
primary: {
Expand Down
2 changes: 1 addition & 1 deletion frontend/postcss.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module.exports = {
plugins: {
'@pandacss/dev/postcss': {},
},
}
}
Loading

0 comments on commit 4741dc3

Please sign in to comment.