-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
128 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
34 changes: 34 additions & 0 deletions
34
packages/examples/dnode-dapp/src/pages/pushscan/[address].tsx
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,34 @@ | ||
// pages/pushscan/[term].tsx | ||
|
||
import { useRouter } from 'next/router'; | ||
import React, { useEffect, useState } from 'react'; | ||
|
||
const PushScan: React.FC = () => { | ||
const router = useRouter(); | ||
const { address } = router.query; // Extract the dynamic term from the URL | ||
const [data, setData] = useState<any>(null); // State to store fetched data or results | ||
|
||
// useEffect(() => { | ||
// if (term) { | ||
// // Fetch data or perform actions based on the dynamic term | ||
// const fetchData = async () => { | ||
// // Replace this with your actual data fetching logic | ||
// const response = await fetch(`/api/pushscan/${term}`); | ||
// const result = await response.json(); | ||
// setData(result); | ||
// }; | ||
|
||
// fetchData(); | ||
// } | ||
// }, [term]); | ||
|
||
return ( | ||
<div className="container mx-auto p-4"> | ||
<h1 className="text-2xl font-bold mb-4"> | ||
PushScan Results for: {address} | ||
</h1> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PushScan; |
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