Skip to content

Commit

Permalink
fix: links, components & versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gagdiez committed Apr 12, 2024
1 parent 27dade7 commit 73ad6ff
Show file tree
Hide file tree
Showing 9 changed files with 138 additions and 124 deletions.
18 changes: 9 additions & 9 deletions templates/frontend/next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@
"lint": "next lint"
},
"dependencies": {
"@near-wallet-selector/core": "^8.9.6",
"@near-wallet-selector/here-wallet": "^8.9.6",
"@near-wallet-selector/modal-ui": "^8.9.6",
"@near-wallet-selector/my-near-wallet": "^8.9.6",
"@web3-onboard/core": "^2.21.4",
"@web3-onboard/injected-wallets": "^2.10.14",
"@near-wallet-selector/core": "^8.9.7",
"@near-wallet-selector/here-wallet": "^8.9.7",
"@near-wallet-selector/modal-ui": "^8.9.7",
"@near-wallet-selector/my-near-wallet": "^8.9.7",
"@web3-onboard/core": "^2.21.5",
"@web3-onboard/injected-wallets": "^2.10.15",
"@web3-onboard/ledger": "^2.6.0",
"@web3-onboard/react": "^2.8.15",
"@web3-onboard/react": "^2.8.16",
"@web3-onboard/walletconnect": "^2.5.4",
"base64-js": "^1.5.1",
"ieee754": "^1.2.1",
"near-api-js": "^3.0.4",
"near-social-vm": "github:gagdiez/VM" ,
"next": "14.1.4",
"next": "14.2.0",
"pino-pretty": "^11.0.0",
"react": "^18",
"react-dom": "^18",
"zustand": "^4.5.2"
},
"devDependencies": {
"eslint": "^9.0",
"eslint-config-next": "14.1.4"
"eslint-config-next": "14.2.0"
}
}
11 changes: 7 additions & 4 deletions templates/frontend/next-app/src/app/page.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Image from 'next/image';

import NearLogo from '/public/near.svg';
import NextLogo from '/public/next.svg';
import styles from './app.module.css';
import { DocsCard, HelloComponentsCard, HelloNearCard } from '@/components/cards';

Expand All @@ -10,16 +13,16 @@ export default function Home() {
<div className={styles.center}>
<Image
className={styles.logo}
src="/near.svg"
alt="Next.js Logo"
src={NearLogo}
alt="NEAR Logo"
width={110 * 1.5}
height={28 * 1.5}
priority
/>
<h3 className="ms-2 me-3 text-dark"> + </h3>
<Image
className={styles.logo}
src="/next.svg"
src={NextLogo}
alt="Next.js Logo"
width={300 * .58}
height={61 * .58}
Expand All @@ -34,4 +37,4 @@ export default function Home() {
</div>
</main>
);
}
}
16 changes: 9 additions & 7 deletions templates/frontend/next-app/src/components/cards.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import Link from 'next/link';

import styles from '../app/app.module.css';

export const DocsCard = () => {
return (
<a
href="https://docs.near.org/develop/integrate/quickstart-frontend"
<Link
href="https://docs.near.org/build/web3-apps/quickstart"
className={styles.card}
target='_blank'
rel="noopener noreferrer"
Expand All @@ -12,12 +14,12 @@ export const DocsCard = () => {
Near Docs <span>-&gt;</span>
</h2>
<p>Learn how this application works, and what you can build on Near.</p>
</a>);
</Link>);
};

export const HelloNearCard = () => {
return (
<a
<Link
href="/hello-near"
className={styles.card}
rel="noopener noreferrer"
Expand All @@ -26,13 +28,13 @@ export const HelloNearCard = () => {
Near Integration <span>-&gt;</span>
</h2>
<p>Discover how simple it is to interact with a Near smart contract.</p>
</a>
</Link>
);
};

export const HelloComponentsCard = () => {
return (
<a
<Link
href="/hello-components"
className={styles.card}
rel="noopener noreferrer"
Expand All @@ -41,6 +43,6 @@ export const HelloComponentsCard = () => {
Web3 Components <span>-&gt;</span>
</h2>
<p>See how Web3 components can help you to create multi-chain apps.</p>
</a>
</Link>
);
};
4 changes: 2 additions & 2 deletions templates/frontend/next-app/src/components/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import Image from 'next/image';
import Link from 'next/link';
import { useEffect, useState } from 'react';

import NearLogo from '/public/near-logo.svg';
import { useStore } from '@/app/layout';

export const Navigation = () => {

const { signedAccountId, wallet } = useStore();
const [action, setAction] = useState(() => { });
const [label, setLabel] = useState('Loading...');
Expand All @@ -26,7 +26,7 @@ export const Navigation = () => {
<nav className="navbar navbar-expand-lg">
<div className="container-fluid">
<Link href="/" passHref legacyBehavior>
<Image priority src="/near-logo.svg" alt="NEAR" width="30" height="24" className="d-inline-block align-text-top" />
<Image priority src={NearLogo} alt="NEAR" width="30" height="24" className="d-inline-block align-text-top" />
</Link>
<div className='navbar-nav pt-1'>
<button className="btn btn-secondary" onClick={action} > {label} </button>
Expand Down
30 changes: 15 additions & 15 deletions templates/frontend/next-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@
"lint": "next lint"
},
"dependencies": {
"@near-wallet-selector/core": "^8.9.6",
"@near-wallet-selector/here-wallet": "^8.9.6",
"@near-wallet-selector/modal-ui": "^8.9.6",
"@near-wallet-selector/my-near-wallet": "^8.9.6",
"@web3-onboard/core": "^2.20.2",
"@web3-onboard/injected-wallets": "^2.10.1",
"@web3-onboard/ledger": "^2.4.6",
"@web3-onboard/react": "^2.8.7",
"@web3-onboard/walletconnect": "^2.3.9",
"@near-wallet-selector/core": "^8.9.7",
"@near-wallet-selector/here-wallet": "^8.9.7",
"@near-wallet-selector/modal-ui": "^8.9.7",
"@near-wallet-selector/my-near-wallet": "^8.9.7",
"@web3-onboard/core": "^2.21.5",
"@web3-onboard/injected-wallets": "^2.10.15",
"@web3-onboard/ledger": "^2.6.0",
"@web3-onboard/react": "^2.8.16",
"@web3-onboard/walletconnect": "^2.5.4",
"base64-js": "^1.5.1",
"ieee754": "^1.2.1",
"near-api-js": "^2.1.3",
"near-api-js": "^3.0.4",
"near-social-vm": "github:gagdiez/VM" ,
"next": "14.0.1",
"pino-pretty": "^10.2.3",
"next": "14.2.0",
"pino-pretty": "^11.0.0",
"react": "^18.2.0",
"react-bootstrap": "^2.10.2",
"react-bootstrap-icons": "^1.11.3",
"react-bootstrap-icons": "^1.11.4",
"react-dom": "^18.2.0",
"react-singleton-hook": "^4.0.1",
"zustand": "^4.5.2"
},
"devDependencies": {
"eslint": "^8.53",
"eslint-config-next": "14.0.1"
"eslint": "^9.0",
"eslint-config-next": "14.2.0"
}
}
25 changes: 15 additions & 10 deletions templates/frontend/next-page/src/components/cards.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
import Link from 'next/link';

import styles from '../styles/app.module.css';

export const DocsCard = () => {
return (
<a
href="https://docs.near.org/develop/integrate/quickstart-frontend"
<Link
href="https://docs.near.org/build/web3-apps/quickstart"
className={styles.card}
target="_blank"
target='_blank'
rel="noopener noreferrer"
>
<h2>
Near Docs <span>-&gt;</span>
</h2>
<p>Learn how this application works, and what you can build on Near.</p>
</a>
);
</Link>);
};

export const HelloNearCard = () => {
return (
<a href="/hello-near" className={styles.card} rel="noopener noreferrer">
<Link
href="/hello-near"
className={styles.card}
rel="noopener noreferrer"
>
<h2>
Near Integration <span>-&gt;</span>
</h2>
<p>Discover how simple it is to interact with a Near smart contract.</p>
</a>
</Link>
);
};

export const HelloComponentsCard = () => {
return (
<a
<Link
href="/hello-components"
className={styles.card}
rel="noopener noreferrer"
Expand All @@ -38,6 +43,6 @@ export const HelloComponentsCard = () => {
Web3 Components <span>-&gt;</span>
</h2>
<p>See how Web3 components can help you to create multi-chain apps.</p>
</a>
</Link>
);
};
};
5 changes: 2 additions & 3 deletions templates/frontend/next-page/src/components/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import Image from 'next/image';
import Link from 'next/link';
import { useEffect, useState } from 'react';

import NearLogo from 'public/near-logo.svg';
//import { useWallet } from '@/wallets/wallet-selector';
import NearLogo from '/public/near-logo.svg';
import { useStore } from '@/layout';

export const Navigation = () => {
Expand All @@ -21,7 +20,7 @@ export const Navigation = () => {
setAction(() => wallet.signIn);
setLabel('Login');
}
}, [signedAccountId, wallet, setAction, setLabel]);
}, [signedAccountId, wallet]);

return (
<nav className="navbar navbar-expand-lg">
Expand Down
19 changes: 9 additions & 10 deletions templates/frontend/next-page/src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import Image from 'next/image';

import NearLogo from '/public/near.svg';
import NextLogo from '/public/next.svg';
import styles from '@/styles/app.module.css';
import {
DocsCard,
HelloComponentsCard,
HelloNearCard,
} from '@/components/cards';
import { DocsCard, HelloComponentsCard, HelloNearCard } from '@/components/cards';

export default function Home() {
return (
Expand All @@ -14,19 +13,19 @@ export default function Home() {
<div className={styles.center}>
<Image
className={styles.logo}
src="/near.svg"
alt="Next.js Logo"
src={NearLogo}
alt="NEAR Logo"
width={110 * 1.5}
height={28 * 1.5}
priority
/>
<h3 className="ms-2 me-3 text-dark"> + </h3>
<Image
className={styles.logo}
src="/next.svg"
src={NextLogo}
alt="Next.js Logo"
width={300 * 0.58}
height={61 * 0.58}
width={300 * .58}
height={61 * .58}
priority
/>
</div>
Expand Down
Loading

0 comments on commit 73ad6ff

Please sign in to comment.