-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from gagdiez/main
Removed components by default
- Loading branch information
Showing
18 changed files
with
123 additions
and
546 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,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,45 +1,32 @@ | ||
import Link from "next/link"; | ||
import Link from 'next/link'; | ||
|
||
import styles from "../styles/app.module.css"; | ||
import styles from '@/styles/app.module.css'; | ||
|
||
export const DocsCard = () => { | ||
export const Cards = () => { | ||
return ( | ||
<Link | ||
href="https://docs.near.org/develop/integrate/quickstart-frontend" | ||
className={styles.card} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<h2> | ||
Near Docs <span>-></span> | ||
</h2> | ||
<p>Learn how this application works, and what you can build on Near.</p> | ||
</Link> | ||
); | ||
}; | ||
<div className={styles.grid}> | ||
<Link | ||
href="https://docs.near.org/build/web3-apps/quickstart" | ||
className={styles.card} | ||
target='_blank' | ||
rel="noopener noreferrer" | ||
> | ||
<h2> | ||
Near Docs <span>-></span> | ||
</h2> | ||
<p>Learn how this application works, and what you can build on Near.</p> | ||
</Link> | ||
|
||
export const HelloNearCard = () => { | ||
return ( | ||
<Link href="/hello-near" className={styles.card} rel="noopener noreferrer"> | ||
<h2> | ||
Near Integration <span>-></span> | ||
</h2> | ||
<p>Discover how simple it is to interact with a Near smart contract.</p> | ||
</Link> | ||
); | ||
}; | ||
|
||
export const HelloComponentsCard = () => { | ||
return ( | ||
<Link | ||
href="/hello-components" | ||
className={styles.card} | ||
rel="noopener noreferrer" | ||
> | ||
<h2> | ||
Web3 Components <span>-></span> | ||
</h2> | ||
<p>See how Web3 components can help you to create multi-chain apps.</p> | ||
</Link> | ||
<Link | ||
href="/hello-near" | ||
className={styles.card} | ||
rel="noopener noreferrer" | ||
> | ||
<h2> | ||
Near Integration <span>-></span> | ||
</h2> | ||
<p>Discover how simple it is to interact with a Near smart contract.</p> | ||
</Link> | ||
</div> | ||
); | ||
}; | ||
}; |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { createContext } from 'react'; | ||
|
||
/** | ||
* @typedef NearContext | ||
* @property {import('./wallets/near').Wallet} wallet Current wallet | ||
* @property {string} signedAccountId The AccountId of the signed user | ||
*/ | ||
|
||
/** @type {import ('react').Context<NearContext>} */ | ||
export const NearContext = createContext({ | ||
wallet: undefined, | ||
signedAccountId: '' | ||
}); |
This file was deleted.
Oops, something went wrong.
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,10 +1,23 @@ | ||
import RootLayout from "@/layout"; | ||
import "@/styles/globals.css"; | ||
import { useEffect, useState } from 'react'; | ||
|
||
import '@/styles/globals.css'; | ||
import { NearContext } from '@/context'; | ||
import { Navigation } from '@/components/navigation'; | ||
|
||
import { Wallet } from '@/wallets/near'; | ||
import { NetworkId, HelloNearContract } from '@/config'; | ||
|
||
const wallet = new Wallet({ createAccessKeyFor: HelloNearContract, networkId: NetworkId }); | ||
|
||
export default function MyApp({ Component, pageProps }) { | ||
const [signedAccountId, setSignedAccountId] = useState(''); | ||
|
||
useEffect(() => { wallet.startUp(setSignedAccountId) }, []); | ||
|
||
return ( | ||
<RootLayout> | ||
<NearContext.Provider value={{ wallet, signedAccountId }}> | ||
<Navigation /> | ||
<Component {...pageProps} /> | ||
</RootLayout> | ||
</NearContext.Provider> | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.