diff --git a/templates/frontend/vite-react/package.json b/templates/frontend/vite-react/package.json index 12f07bcec..f25e610ff 100644 --- a/templates/frontend/vite-react/package.json +++ b/templates/frontend/vite-react/package.json @@ -32,8 +32,7 @@ "near-api-js": "^4.0.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "wagmi": "^2.14.4", - "wouter": "^3.3.5" + "react-router": "^7.1.1" }, "devDependencies": { "@eslint/js": "^9.17.0", @@ -50,4 +49,4 @@ "vite": "^6.0.3", "vite-plugin-eslint": "^1.8.1" } -} \ No newline at end of file +} diff --git a/templates/frontend/vite-react/src/App.jsx b/templates/frontend/vite-react/src/App.jsx index 309a1c620..d78993609 100644 --- a/templates/frontend/vite-react/src/App.jsx +++ b/templates/frontend/vite-react/src/App.jsx @@ -1,10 +1,11 @@ import { Navigation } from './components/navigation'; import Home from './pages/home'; -import { Route } from 'wouter'; + import HelloNear from './pages/hello_near'; import { useEffect, useState } from 'react'; import { NetworkId } from './config.js'; import { NearContext, Wallet } from '@/wallets/near'; +import { BrowserRouter, Routes, Route } from "react-router"; // Wallet instance const wallet = new Wallet({ NetworkId: NetworkId }); @@ -21,9 +22,13 @@ function App() { return ( - - - + + + + } /> + } /> + + ) } diff --git a/templates/frontend/vite-react/src/components/cards.jsx b/templates/frontend/vite-react/src/components/cards.jsx index f37ac9d95..5aa44fe83 100644 --- a/templates/frontend/vite-react/src/components/cards.jsx +++ b/templates/frontend/vite-react/src/components/cards.jsx @@ -1,4 +1,5 @@ import styles from '@/styles/app.module.css'; +import { Link } from 'react-router'; export const Cards = () => { return ( @@ -15,12 +16,12 @@ export const Cards = () => {

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

- +

Near Integration ->

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

-
+ ); }; diff --git a/templates/frontend/vite-react/src/components/navigation.jsx b/templates/frontend/vite-react/src/components/navigation.jsx index a995d9e2e..d7dc36b52 100644 --- a/templates/frontend/vite-react/src/components/navigation.jsx +++ b/templates/frontend/vite-react/src/components/navigation.jsx @@ -2,7 +2,7 @@ import { useContext,useEffect, useState } from 'react'; import NearLogo from '@/assets/near-logo.svg'; import { NearContext } from '@/wallets/near'; -import { Link } from 'wouter'; +import { Link } from "react-router"; import styles from '@/styles/app.module.css'; export const Navigation = () => { @@ -25,7 +25,7 @@ export const Navigation = () => { return (