Skip to content

Commit

Permalink
💁💁‍♂️ ↝ Branch now able to build with all web3 components taken out
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Jun 28, 2023
1 parent 00d5af8 commit f306e38
Show file tree
Hide file tree
Showing 29 changed files with 16 additions and 6,463 deletions.
24 changes: 3 additions & 21 deletions components/Gameplay/Planets/PlanetCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import Link from "next/link";
import { useSession, useSupabaseClient } from "@supabase/auth-helpers-react";
import PlanetEditor, { PlanetEditorFromData } from "../../../pages/generator/planet-editor";
// import StakePlay from "../../../pages/stake/play";
import UtterancesComments from "../../Lens/Utterances";
import { useContract, useContractRead, useContractWrite, useLazyMint } from "@thirdweb-dev/react";
import { planetsImagesCdnAddress } from "../../../constants/cdn";
import { v4 as uuidv4 } from 'uuid';
import { Col, Container, Row, Form } from "react-bootstrap";
Expand All @@ -30,22 +28,6 @@ export function PlanetCard ({ activeTab, planetId }) {
}
);
}
const { contract } = useContract(planet?.contract);
/*const { mutateAsync: lazyMint, isLoading } = useContractWrite(contract, "lazymint");
const lazyMintAnomaly = async () => {
try {
const data = await lazyMint([ _amount, _baseURIForTokens, _data ]);
console.info('contract call success: ', data);
} catch (err) {
console.error('contract call failure: ', err);
}
}*/

const {
mutate: lazyMint,
isLoading,
error,
} = useLazyMint(contract);

// function showNftMetadataUri (planet) {
// const { contract } = useContract(`{planet?.contract}`);
Expand Down Expand Up @@ -162,14 +144,14 @@ export function PlanetCard ({ activeTab, planetId }) {
<p>{planet?.owner} Owner</p>
{planet?.owner == session?.user?.id /*&& planet?.userId == username*/ && (
<>
<button onClick={() => lazyMint({ metadatas: [{ name: planet?.content, media: planet?.cover, description: planet?.ticId, properties: { trait_type1: 'value' }}]})}>Mint NFT of planet</button>
{/* <button onClick={() => lazyMint({ metadatas: [{ name: planet?.content, media: planet?.cover, description: planet?.ticId, properties: { trait_type1: 'value' }}]})}>Mint NFT of planet</button> */}
<Link href='https://deepnote.com/workspace/star-sailors-49d2efda-376f-4329-9618-7f871ba16007/project/Star-Sailors-Light-Curve-Plot-b4c251b4-c11a-481e-8206-c29934eb75da/notebook/notebook-377269a4c09f46908203c402cb8545b0'><div><iframe title="Embedded cell output" src="https://embed.deepnote.com/b4c251b4-c11a-481e-8206-c29934eb75da/b56a0704304940e49c38823795edaa20/b1b6860bdf364fcea023992c1ae527d6?height=294.6875" height="294.6875" width="500"/><iframe title="Embedded cell output" src="https://embed.deepnote.com/b4c251b4-c11a-481e-8206-c29934eb75da/377269a4c09f46908203c402cb8545b0/2b82b4f1d68a4ca282977277e09df860?height=43" height="650" width="100%"/></div></Link> {/* https://codesandbox.io/s/nextjs-example-react-jupyter-notebook-viewer-lzjcb5?file=/pages/index.js:21-33 */} {/* Set this to pull in different blocks, with different inputs (from Deepnote/flask API) depending on `{planet?.ticId}` */}
</>
)}
{planet?.owner == session?.user?.id /*&& planet?.userId == username*/ && (
<>
Move this underneath Datasets tab in PlanetCard.tsx
<button onClick={() => lazyMint({ metadatas: [{ name: planet?.content, media: planet?.cover, description: planet?.ticId, properties: { trait_type1: 'value' }}]})}>Mint NFT of planet</button>
{/* <button onClick={() => lazyMint({ metadatas: [{ name: planet?.content, media: planet?.cover, description: planet?.ticId, properties: { trait_type1: 'value' }}]})}>Mint NFT of planet</button> */}
{!planet?.ticId && (
<p>This planet doesn't have a TIC ID</p>
// Update planet tic textarea & button
Expand All @@ -193,7 +175,7 @@ export function PlanetCard ({ activeTab, planetId }) {
<div className="mockup-code">
<pre data-prefix="$"><code>npm i daisyui</code></pre>
</div>
</Card><Card noPadding={false}><UtterancesComments /></Card></div>
</Card>{/*<Card noPadding={false}><UtterancesComments /></Card>*/}</div>
)}
{activeTab === 'sandbox' && (
<div><Card noPadding={false}>
Expand Down
3 changes: 1 addition & 2 deletions components/Governance/Connections/AuthenticateAccount.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { useState, useEffect } from "react";
import { useSession, useSupabaseClient } from "@supabase/auth-helpers-react";
import { useAddress } from "@thirdweb-dev/react";
import { Database } from "../../../utils/database.types";

type Profiles = Database['public']['Tables']['profiles']['Row'];

export default function AuthenticateWalletToDb () {
const session = useSession();
const supabase = useSupabaseClient();
const address = useAddress();
const address = useState()

const [loading, setLoading] = useState(false);
const [userAddress, setUserAddress] = useState();
Expand Down
47 changes: 0 additions & 47 deletions components/Lens/FeedPost.tsx

This file was deleted.

104 changes: 0 additions & 104 deletions components/Lens/LensUser.tsx

This file was deleted.

123 changes: 0 additions & 123 deletions components/Lens/Utterances.jsx

This file was deleted.

Loading

0 comments on commit f306e38

Please sign in to comment.