diff --git a/pages/_app.tsx b/pages/_app.tsx
index 9d942da..7c1931d 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -13,6 +13,7 @@ import metrics from '../src/metrics';
import 'bootstrap/dist/css/bootstrap.min.css';
import WalletProvider from '../dabu/WalletProvider';
import {ChainId} from '@thirdweb-dev/react';
+import TwitchEmbed from '@/src/components/blocks/TwitchEmbed';
function MyApp({Component, pageProps}: AppProps) {
return (
-
+
+
+
diff --git a/pages/index.tsx b/pages/index.tsx
index 688f679..60652f0 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -7,87 +7,32 @@ import DABU from '../dabu';
import H from '../src/components/common/H';
import {runTime} from '../dabu/helpers';
import Web3 from 'web3';
+import TwitchEmbed from '@/src/components/blocks/TwitchEmbed';
var BN: any = Web3.utils.hexToNumberString;
-export async function getStaticProps(context: any, dabu: any) {
- const getLatestListed = async () => {
- // INIT Dabu
- var dabu = new DABU(process.env.AKKORO_ENV);
- console.log('dabu', dabu, await dabu.get_latest_nft_listing());
- //Get Active Listings
- const latestListing: any = await dabu.get_latest_nft_listing();
+// export async function getStaticProps(context: any, dabu: any) {
+// const getLatestListed = async () => {
+// // INIT Dabu
+// var dabu = new DABU(process.env.AKKORO_ENV);
+// console.log('dabu', dabu, await dabu.get_latest_nft_listing());
+// //Get Active Listings
+// const latestListing: any = await dabu.get_latest_nft_listing();
- return latestListing;
- };
- const {scriptDuration: duration, res: latestListing} = await runTime(
- getLatestListed
- );
- return {
- props: {
- latestListing: JSON.stringify(latestListing),
- scriptDuration: duration,
- },
- // - At most once every 10 seconds
- revalidate: 15, // In seconds
- };
-}
+// return latestListing;
+// };
+// const {scriptDuration: duration, res: latestListing} = await runTime(
+// getLatestListed
+// );
+// return {
+// props: {
+// latestListing: JSON.stringify(latestListing),
+// scriptDuration: duration,
+// },
+// // - At most once every 10 seconds
+// revalidate: 15, // In seconds
+// };
+// }
export default function Dragon({latestListing}: any): JSX.Element {
- const [
- {
- id,
- tokenId,
- currencySymbol,
- asset,
- buyOutPrice,
- currencyContractAddress,
- decimals,
- network,
- sellerAddress,
- quantity,
- },
- setState,
- ] = useState({
- id: '',
- tokenId: '',
- currencySymbol: '',
- asset: '',
- buyOutPrice: '',
- currencyContractAddress: '',
- decimals: '',
- network: '',
- sellerAddress: '',
- quantity: '',
- } as any);
- useEffect(() => {
- latestListing = JSON.parse(latestListing);
- if (typeof latestListing === 'object' && latestListing !== null) {
- const nft = latestListing;
-
- const _tokenId = BN(nft.tokenId._hex);
- const _quantity = BN(nft.quantity._hex);
- const _price = BN(nft.buyoutPrice._hex);
- setState({
- ...nft,
- id: nft.id,
- tokenId: _tokenId,
- quantity: _quantity,
- contractAddress: nft.assetContractAddress,
- buyOutPrice:
- typeof _price !== 'undefined'
- ? _price.substr(
- 0,
- _price.length - nft.buyoutCurrencyValuePerToken.decimals
- )
- : null,
- currencySymbol: nft.buyoutCurrencyValuePerToken.symbol,
- sellerAddress: nft.sellerAddress,
- asset: {
- ...nft.asset,
- id: BN(nft.asset.id._hex),
- },
- });
- }
- }, [latestListing]);
return (
<>