-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: formatted documents and added prettier
- Loading branch information
1 parent
9bb3d73
commit 30eb0d7
Showing
35 changed files
with
1,623 additions
and
615 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"singleQuote": false, | ||
"trailingComma": "es5", | ||
"semi": true, | ||
"tabWidth": 2 | ||
} |
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
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
10 changes: 5 additions & 5 deletions
10
examples/sdk-starknetjs-starknetkit-starknet-react/src/App.tsx
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,14 +1,14 @@ | ||
import React from 'react'; | ||
import './App.css'; | ||
import React from "react"; | ||
import "./App.css"; | ||
import StarknetProvider from "./components/StarknetProvider"; | ||
import Home from 'components/Home'; | ||
import Home from "components/Home"; | ||
|
||
function App() { | ||
return ( | ||
<StarknetProvider> | ||
< Home/> | ||
<Home /> | ||
</StarknetProvider> | ||
); | ||
} | ||
|
||
export default App; | ||
export default App; |
51 changes: 28 additions & 23 deletions
51
examples/sdk-starknetjs-starknetkit-starknet-react/src/components/StarknetProvider.tsx
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,28 +1,33 @@ | ||
import React from "react"; | ||
import { mainnet } from "@starknet-react/chains"; | ||
import { StarknetConfig, publicProvider, useInjectedConnectors, argent, braavos, starkscan } from "@starknet-react/core"; | ||
import { | ||
StarknetConfig, | ||
publicProvider, | ||
useInjectedConnectors, | ||
argent, | ||
braavos, | ||
starkscan, | ||
} from "@starknet-react/core"; | ||
|
||
function StarknetProvider({ children }: any) { | ||
const { connectors: injected } = useInjectedConnectors({ | ||
recommended: [argent(), braavos()], | ||
includeRecommended: 'always', | ||
}) | ||
|
||
const connectors = [ | ||
...injected, | ||
] | ||
|
||
return ( | ||
<StarknetConfig | ||
connectors={connectors} | ||
chains={[mainnet]} | ||
provider={publicProvider()} | ||
explorer={starkscan} | ||
autoConnect | ||
> | ||
{children} | ||
</StarknetConfig> | ||
) | ||
} | ||
const { connectors: injected } = useInjectedConnectors({ | ||
recommended: [argent(), braavos()], | ||
includeRecommended: "always", | ||
}); | ||
|
||
export default StarknetProvider; | ||
const connectors = [...injected]; | ||
|
||
return ( | ||
<StarknetConfig | ||
connectors={connectors} | ||
chains={[mainnet]} | ||
provider={publicProvider()} | ||
explorer={starkscan} | ||
autoConnect | ||
> | ||
{children} | ||
</StarknetConfig> | ||
); | ||
} | ||
|
||
export default StarknetProvider; |
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
10 changes: 5 additions & 5 deletions
10
examples/sdk-starknetjs-starknetkit-starknet-react/src/index.tsx
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
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ module.exports = { | |
extend: {}, | ||
}, | ||
plugins: [], | ||
} | ||
}; |
38 changes: 19 additions & 19 deletions
38
examples/sdk-starknetjs-starknetkit-starknet-react/tsconfig.json
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,20 +1,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"module": "ES2015", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "react", | ||
"baseUrl": "./src", | ||
}, | ||
"include": ["src/**/*.ts", "src/**/*.tsx"], | ||
"exclude": ["node_modules", "dist"] | ||
} | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"module": "ES2015", | ||
"moduleResolution": "Bundler", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "react", | ||
"baseUrl": "./src" | ||
}, | ||
"include": ["src/**/*.ts", "src/**/*.tsx"], | ||
"exclude": ["node_modules", "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
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
Oops, something went wrong.