Skip to content

Commit 2576ef3

Browse files
Merge pull request #15 from Nuklai/piotr-add-biome
Add biome
2 parents 2bbb27c + f5983e0 commit 2576ef3

18 files changed

+1873
-1738
lines changed

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"cSpell.words": ["Nuklai"]
2+
"cSpell.words": ["Nuklai", "wailsjs"],
3+
"editor.defaultFormatter": "biomejs.biome"
34
}

biome.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"linter": {
7+
"enabled": true,
8+
"rules": {
9+
"recommended": true
10+
}
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"formatWithErrors": false,
15+
"ignore": [],
16+
"attributePosition": "auto",
17+
"indentStyle": "space",
18+
"indentWidth": 2,
19+
"lineWidth": 80,
20+
"lineEnding": "lf"
21+
},
22+
"javascript": {
23+
"formatter": {
24+
"quoteStyle": "single"
25+
}
26+
},
27+
"files": {
28+
"ignore": ["wailsjs", "build", "dist"]
29+
}
30+
}

frontend/package.json

+30-28
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
{
2-
"name": "nuklai-wallet-frontend",
3-
"private": true,
4-
"version": "0.1.0",
5-
"type": "module",
6-
"scripts": {
7-
"dev": "vite",
8-
"build": "vite build",
9-
"preview": "vite preview"
10-
},
11-
"dependencies": {
12-
"@ant-design/icons": "^5.2.5",
13-
"@ant-design/plots": "^1.2.5",
14-
"antd": "^5.8.4",
15-
"react": "^18.3.1",
16-
"react-dom": "^18.3.1",
17-
"react-router-dom": "^6.15.0"
18-
},
19-
"devDependencies": {
20-
"@types/node": "^20.14.10",
21-
"@types/react": "^18.3.3",
22-
"@types/react-dom": "^18.3.0",
23-
"@vitejs/plugin-react": "^4.3.1",
24-
"path": "^0.12.7",
25-
"typescript": "^5.5.3",
26-
"url": "^0.11.1",
27-
"vite": "^5.3.3"
28-
},
29-
"packageManager": "[email protected]"
2+
"name": "nuklai-wallet-frontend",
3+
"private": true,
4+
"version": "0.1.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"check": "biome check ./"
11+
},
12+
"dependencies": {
13+
"@ant-design/icons": "^5.2.5",
14+
"@ant-design/plots": "^1.2.5",
15+
"antd": "^5.8.4",
16+
"react": "^18.3.1",
17+
"react-dom": "^18.3.1",
18+
"react-router-dom": "^6.15.0"
19+
},
20+
"devDependencies": {
21+
"@biomejs/biome": "1.8.3",
22+
"@types/node": "^20.14.10",
23+
"@types/react": "^18.3.3",
24+
"@types/react-dom": "^18.3.0",
25+
"@vitejs/plugin-react": "^4.3.1",
26+
"path": "^0.12.7",
27+
"typescript": "^5.5.3",
28+
"url": "^0.11.1",
29+
"vite": "^5.3.3"
30+
},
31+
"packageManager": "[email protected]"
3032
}

frontend/package.json.md5

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
65321fcf80cf31c52b644cf6ab6757d6
1+
56fb010925dec06f4b587d097770583a

frontend/src/App.tsx

+55-54
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,66 @@
11
// Copyright (C) 2024, Nuklai. All rights reserved.
22
// See the file LICENSE for licensing terms.
33

4-
import { App as AApp, FloatButton, Layout, Row, Typography } from "antd";
5-
import { useEffect, useState } from "react";
6-
import { Outlet } from "react-router-dom";
7-
import { GetCommitHash, OpenLink } from "../wailsjs/go/main/App";
8-
import logo from "./assets/images/nuklai-footer.png";
9-
import NavBar from "./components/NavBar";
4+
import { App as AApp, FloatButton, Layout, Row, Typography } from 'antd';
5+
import { useEffect, useState } from 'react';
6+
import { Outlet } from 'react-router-dom';
7+
import { GetCommitHash, OpenLink } from '../wailsjs/go/main/App';
8+
import logo from './assets/images/nuklai-footer.png';
9+
import NavBar from './components/NavBar';
1010

1111
const { Text } = Typography;
1212
const { Content } = Layout;
1313

1414
const App = () => {
15-
const [commit, setCommit] = useState("");
16-
useEffect(() => {
17-
const getCommit = async () => {
18-
const c = await GetCommitHash();
19-
setCommit(c);
20-
};
21-
getCommit();
22-
}, []);
23-
return (
24-
<AApp>
25-
<Layout
26-
style={{
27-
minHeight: "95vh",
28-
}}
29-
>
30-
<NavBar />
31-
<Layout className="site-layout">
32-
<Content
33-
style={{
34-
background: "white",
35-
padding: "0 50px",
36-
}}
37-
>
38-
<div
39-
style={{
40-
padding: 24,
41-
}}
42-
>
43-
<Outlet />
44-
<FloatButton.BackTop />
45-
</div>
46-
</Content>
47-
</Layout>
48-
<Row justify="center" style={{ background: "white" }}>
49-
<a
50-
onClick={() => {
51-
OpenLink("https://github.com/ava-labs/hypersdk");
52-
}}
53-
>
54-
<img src={logo} style={{ width: "300px" }} alt="footer" />
55-
</a>
56-
</Row>
57-
<Row justify="center" style={{ background: "white" }}>
58-
<Text type="secondary">Commit: {commit}</Text>
59-
</Row>
60-
</Layout>
61-
</AApp>
62-
);
15+
const [commit, setCommit] = useState('');
16+
useEffect(() => {
17+
const getCommit = async () => {
18+
const c = await GetCommitHash();
19+
setCommit(c);
20+
};
21+
getCommit();
22+
}, []);
23+
return (
24+
<AApp>
25+
<Layout
26+
style={{
27+
minHeight: '95vh',
28+
}}
29+
>
30+
<NavBar />
31+
<Layout className="site-layout">
32+
<Content
33+
style={{
34+
background: 'white',
35+
padding: '0 50px',
36+
}}
37+
>
38+
<div
39+
style={{
40+
padding: 24,
41+
}}
42+
>
43+
<Outlet />
44+
<FloatButton.BackTop />
45+
</div>
46+
</Content>
47+
</Layout>
48+
<Row justify="center" style={{ background: 'white' }}>
49+
<a
50+
// biome-ignore lint/a11y/useValidAnchor: TODO
51+
onClick={() => {
52+
OpenLink('https://github.com/ava-labs/hypersdk');
53+
}}
54+
>
55+
<img src={logo} style={{ width: '300px' }} alt="footer" />
56+
</a>
57+
</Row>
58+
<Row justify="center" style={{ background: 'white' }}>
59+
<Text type="secondary">Commit: {commit}</Text>
60+
</Row>
61+
</Layout>
62+
</AApp>
63+
);
6364
};
6465

6566
export default App;

0 commit comments

Comments
 (0)