Skip to content

Commit

Permalink
fix: components
Browse files Browse the repository at this point in the history
  • Loading branch information
gagdiez committed May 14, 2024
1 parent 319fe29 commit dc115fb
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-near-app",
"version": "6.4.5",
"version": "7.0.0-beta.0",
"description": "Quickly scaffold your dApp on NEAR Blockchain",
"main": "index.js",
"engines": {
Expand Down
1 change: 1 addition & 0 deletions templates/frontend/components/next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@web3-onboard/walletconnect": "^2.5.4",
"base64-js": "^1.5.1",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
"ieee754": "^1.2.1",
"near-api-js": "^3.0.4",
"near-social-vm": "github:gagdiez/VM",
Expand Down
6 changes: 5 additions & 1 deletion templates/frontend/components/next-app/src/components/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ export default function Component({ src }) {
wallet && initNear && initNear({ networkId: NetworkId, selector: wallet.selector, config: { allowOtherContracts: true } });
}, [wallet, initNear]);

const href = wallet.networkId === 'mainnet' ?
`https://near.social/mob.near/widget/WidgetSource?src=${src}` :
`https://test.near.social/eugenethedream/widget/WidgetSource?src=${src}`;

return (
<div>
<EthersProviderContext.Provider value={ethersContext}>
<Widget src={src} />
</EthersProviderContext.Provider>
<p className="mt-4 small"> <span className="text-secondary">Source:</span> <a href={`https://near.social/mob.near/widget/WidgetSource?src=${src}`}> {src} </a> </p>
<p className="mt-4 small"> <span className="text-secondary">Source:</span> <a href={href}> {src} </a> </p>
</div>
);
}
1 change: 1 addition & 0 deletions templates/frontend/components/next-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@web3-onboard/walletconnect": "^2.5.4",
"base64-js": "^1.5.1",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
"ieee754": "^1.2.1",
"near-api-js": "^3.0.4",
"near-social-vm": "github:gagdiez/VM",
Expand Down
6 changes: 5 additions & 1 deletion templates/frontend/components/next-page/src/components/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ export default function Component({ src }) {
wallet && initNear && initNear({ networkId: NetworkId, selector: wallet.selector, config: { allowOtherContracts: true } });
}, [wallet, initNear]);

const href = wallet.networkId === 'mainnet' ?
`https://near.social/mob.near/widget/WidgetSource?src=${src}` :
`https://test.near.social/eugenethedream/widget/WidgetSource?src=${src}`;

return (
<div>
<EthersProviderContext.Provider value={ethersContext}>
<Widget src={src} />
</EthersProviderContext.Provider>
<p className="mt-4 small"> <span className="text-secondary">Source:</span> <a href={`https://near.social/mob.near/widget/WidgetSource?src=${src}`}> {src} </a> </p>
<p className="mt-4 small"> <span className="text-secondary">Source:</span> <a href={href}> {src} </a> </p>
</div>
);
}
1 change: 1 addition & 0 deletions templates/frontend/next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@near-wallet-selector/modal-ui": "^8.9.7",
"@near-wallet-selector/my-near-wallet": "^8.9.7",
"bootstrap": "^5",
"bootstrap-icons": "^1.11.3",
"near-api-js": "^3.0.4",
"next": "14.2.3",
"react": "^18",
Expand Down
1 change: 1 addition & 0 deletions templates/frontend/next-app/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'bootstrap';
@import 'bootstrap-icons';

:root {
--max-width: 1100px;
Expand Down
1 change: 1 addition & 0 deletions templates/frontend/next-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@near-wallet-selector/modal-ui": "^8.9.7",
"@near-wallet-selector/my-near-wallet": "^8.9.7",
"bootstrap": "^5",
"bootstrap-icons": "^1.11.3",
"near-api-js": "^3.0.4",
"next": "14.2.3",
"react": "^18",
Expand Down
1 change: 1 addition & 0 deletions templates/frontend/next-page/src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'bootstrap';
@import 'bootstrap-icons';

:root {
--max-width: 1100px;
Expand Down
4 changes: 4 additions & 0 deletions test/__snapshots__/make.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ exports[`create frontend 'next-app': --frontend_next-app--package.json 1`] = `
"@near-wallet-selector/modal-ui": "^8.9.7",
"@near-wallet-selector/my-near-wallet": "^8.9.7",
"bootstrap": "^5",
"bootstrap-icons": "^1.11.3",
"near-api-js": "^3.0.4",
"next": "14.2.3",
"react": "^18",
Expand Down Expand Up @@ -880,6 +881,7 @@ exports[`create frontend 'next-app': --frontend_next-app--src--app--globals.css
[
"--frontend_next-app--src--app--globals.css",
"@import 'bootstrap';
@import 'bootstrap-icons';
:root {
--max-width: 1100px;
Expand Down Expand Up @@ -1505,6 +1507,7 @@ exports[`create frontend 'next-page': --frontend_next-page--package.json 1`] = `
"@near-wallet-selector/modal-ui": "^8.9.7",
"@near-wallet-selector/my-near-wallet": "^8.9.7",
"bootstrap": "^5",
"bootstrap-icons": "^1.11.3",
"near-api-js": "^3.0.4",
"next": "14.2.3",
"react": "^18",
Expand Down Expand Up @@ -2113,6 +2116,7 @@ exports[`create frontend 'next-page': --frontend_next-page--src--styles--globals
[
"--frontend_next-page--src--styles--globals.css",
"@import 'bootstrap';
@import 'bootstrap-icons';
:root {
--max-width: 1100px;
Expand Down

0 comments on commit dc115fb

Please sign in to comment.