From 73ad6ff227299cfaf52daa623695d19146b1e54b Mon Sep 17 00:00:00 2001 From: gagdiez Date: Fri, 12 Apr 2024 16:30:48 +0200 Subject: [PATCH] fix: links, components & versions --- templates/frontend/next-app/package.json | 18 +-- templates/frontend/next-app/src/app/page.js | 11 +- .../frontend/next-app/src/components/cards.js | 16 ++- .../next-app/src/components/navigation.js | 4 +- templates/frontend/next-page/package.json | 30 ++-- .../next-page/src/components/cards.js | 25 ++-- .../next-page/src/components/navigation.js | 5 +- .../frontend/next-page/src/pages/index.js | 19 ++- test/__snapshots__/make.test.ts.snap | 134 +++++++++--------- 9 files changed, 138 insertions(+), 124 deletions(-) diff --git a/templates/frontend/next-app/package.json b/templates/frontend/next-app/package.json index f00487064..ea1397636 100644 --- a/templates/frontend/next-app/package.json +++ b/templates/frontend/next-app/package.json @@ -12,20 +12,20 @@ "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", @@ -33,6 +33,6 @@ }, "devDependencies": { "eslint": "^9.0", - "eslint-config-next": "14.1.4" + "eslint-config-next": "14.2.0" } } diff --git a/templates/frontend/next-app/src/app/page.js b/templates/frontend/next-app/src/app/page.js index 45e09cddf..bd48333d4 100644 --- a/templates/frontend/next-app/src/app/page.js +++ b/templates/frontend/next-app/src/app/page.js @@ -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'; @@ -10,8 +13,8 @@ export default function Home() {
Next.js Logo + Next.js Logo ); -} +} \ No newline at end of file diff --git a/templates/frontend/next-app/src/components/cards.js b/templates/frontend/next-app/src/components/cards.js index d88e7f5bf..0c00e6935 100644 --- a/templates/frontend/next-app/src/components/cards.js +++ b/templates/frontend/next-app/src/components/cards.js @@ -1,9 +1,11 @@ +import Link from 'next/link'; + import styles from '../app/app.module.css'; export const DocsCard = () => { return ( - { Near Docs ->

Learn how this application works, and what you can build on Near.

-
); + ); }; export const HelloNearCard = () => { return ( - { Near Integration ->

Discover how simple it is to interact with a Near smart contract.

-
+ ); }; export const HelloComponentsCard = () => { return ( - { Web3 Components ->

See how Web3 components can help you to create multi-chain apps.

-
+ ); }; \ No newline at end of file diff --git a/templates/frontend/next-app/src/components/navigation.js b/templates/frontend/next-app/src/components/navigation.js index a7cb6194b..63a01a1ac 100644 --- a/templates/frontend/next-app/src/components/navigation.js +++ b/templates/frontend/next-app/src/components/navigation.js @@ -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...'); @@ -26,7 +26,7 @@ export const Navigation = () => {