-
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.
Merge pull request #15 from Nuklai/piotr-add-biome
Add biome
- Loading branch information
Showing
18 changed files
with
1,873 additions
and
1,738 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"cSpell.words": ["Nuklai"] | ||
"cSpell.words": ["Nuklai", "wailsjs"], | ||
"editor.defaultFormatter": "biomejs.biome" | ||
} |
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,30 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"ignore": [], | ||
"attributePosition": "auto", | ||
"indentStyle": "space", | ||
"indentWidth": 2, | ||
"lineWidth": 80, | ||
"lineEnding": "lf" | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single" | ||
} | ||
}, | ||
"files": { | ||
"ignore": ["wailsjs", "build", "dist"] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,30 +1,32 @@ | ||
{ | ||
"name": "nuklai-wallet-frontend", | ||
"private": true, | ||
"version": "0.1.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@ant-design/icons": "^5.2.5", | ||
"@ant-design/plots": "^1.2.5", | ||
"antd": "^5.8.4", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-router-dom": "^6.15.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.14.10", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"path": "^0.12.7", | ||
"typescript": "^5.5.3", | ||
"url": "^0.11.1", | ||
"vite": "^5.3.3" | ||
}, | ||
"packageManager": "yarn@4.3.1" | ||
"name": "nuklai-wallet-frontend", | ||
"private": true, | ||
"version": "0.1.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "biome check ./" | ||
}, | ||
"dependencies": { | ||
"@ant-design/icons": "^5.2.5", | ||
"@ant-design/plots": "^1.2.5", | ||
"antd": "^5.8.4", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-router-dom": "^6.15.0" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.8.3", | ||
"@types/node": "^20.14.10", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"path": "^0.12.7", | ||
"typescript": "^5.5.3", | ||
"url": "^0.11.1", | ||
"vite": "^5.3.3" | ||
}, | ||
"packageManager": "yarn@4.3.1" | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
65321fcf80cf31c52b644cf6ab6757d6 | ||
56fb010925dec06f4b587d097770583a |
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 |
---|---|---|
@@ -1,65 +1,66 @@ | ||
// Copyright (C) 2024, Nuklai. All rights reserved. | ||
// See the file LICENSE for licensing terms. | ||
|
||
import { App as AApp, FloatButton, Layout, Row, Typography } from "antd"; | ||
import { useEffect, useState } from "react"; | ||
import { Outlet } from "react-router-dom"; | ||
import { GetCommitHash, OpenLink } from "../wailsjs/go/main/App"; | ||
import logo from "./assets/images/nuklai-footer.png"; | ||
import NavBar from "./components/NavBar"; | ||
import { App as AApp, FloatButton, Layout, Row, Typography } from 'antd'; | ||
import { useEffect, useState } from 'react'; | ||
import { Outlet } from 'react-router-dom'; | ||
import { GetCommitHash, OpenLink } from '../wailsjs/go/main/App'; | ||
import logo from './assets/images/nuklai-footer.png'; | ||
import NavBar from './components/NavBar'; | ||
|
||
const { Text } = Typography; | ||
const { Content } = Layout; | ||
|
||
const App = () => { | ||
const [commit, setCommit] = useState(""); | ||
useEffect(() => { | ||
const getCommit = async () => { | ||
const c = await GetCommitHash(); | ||
setCommit(c); | ||
}; | ||
getCommit(); | ||
}, []); | ||
return ( | ||
<AApp> | ||
<Layout | ||
style={{ | ||
minHeight: "95vh", | ||
}} | ||
> | ||
<NavBar /> | ||
<Layout className="site-layout"> | ||
<Content | ||
style={{ | ||
background: "white", | ||
padding: "0 50px", | ||
}} | ||
> | ||
<div | ||
style={{ | ||
padding: 24, | ||
}} | ||
> | ||
<Outlet /> | ||
<FloatButton.BackTop /> | ||
</div> | ||
</Content> | ||
</Layout> | ||
<Row justify="center" style={{ background: "white" }}> | ||
<a | ||
onClick={() => { | ||
OpenLink("https://github.com/ava-labs/hypersdk"); | ||
}} | ||
> | ||
<img src={logo} style={{ width: "300px" }} alt="footer" /> | ||
</a> | ||
</Row> | ||
<Row justify="center" style={{ background: "white" }}> | ||
<Text type="secondary">Commit: {commit}</Text> | ||
</Row> | ||
</Layout> | ||
</AApp> | ||
); | ||
const [commit, setCommit] = useState(''); | ||
useEffect(() => { | ||
const getCommit = async () => { | ||
const c = await GetCommitHash(); | ||
setCommit(c); | ||
}; | ||
getCommit(); | ||
}, []); | ||
return ( | ||
<AApp> | ||
<Layout | ||
style={{ | ||
minHeight: '95vh', | ||
}} | ||
> | ||
<NavBar /> | ||
<Layout className="site-layout"> | ||
<Content | ||
style={{ | ||
background: 'white', | ||
padding: '0 50px', | ||
}} | ||
> | ||
<div | ||
style={{ | ||
padding: 24, | ||
}} | ||
> | ||
<Outlet /> | ||
<FloatButton.BackTop /> | ||
</div> | ||
</Content> | ||
</Layout> | ||
<Row justify="center" style={{ background: 'white' }}> | ||
<a | ||
// biome-ignore lint/a11y/useValidAnchor: TODO | ||
onClick={() => { | ||
OpenLink('https://github.com/ava-labs/hypersdk'); | ||
}} | ||
> | ||
<img src={logo} style={{ width: '300px' }} alt="footer" /> | ||
</a> | ||
</Row> | ||
<Row justify="center" style={{ background: 'white' }}> | ||
<Text type="secondary">Commit: {commit}</Text> | ||
</Row> | ||
</Layout> | ||
</AApp> | ||
); | ||
}; | ||
|
||
export default App; |
Oops, something went wrong.