-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* button components * feat:marketplace & cryptobot single frontend * WIP: load cryptobots within marketplace * feat: load 3d cryptobots from smart contract * WIP: add filter functionailty * feat: add sort functionailty * chore: refactor sort & filter func * fix: build error * feat: add xtzUsd price func * Revert "feat: add xtzUsd price func" This reverts commit be2c661. * Revert "Revert "feat: add xtzUsd price func"" This reverts commit c230931. * fix: update price fetching endpoint for xtzUsd * chore: update marketplace & cryptobot to /tezos/<url> * chore: Configure PostCSS to use Tailwind * feat: add method for loading nfts by individual tezos addres * fix: remove console warning * feat:basic ui done of transaction * feat: added footer & removed old footer * chore: color & font size fixes * feat:added loader * chore: remove yarn.lock file * feat: add logic for loading user owned bots * feat: option to change beacon to testnet * fix: handle edge case where nft on offer are null. * feat: handle extra props for button component * feat: add logic for purchasing a cryptobot. * feat: add logic for buying cryptobot from marketplace * feat: add logic for loading owned bots in profile view * fix: navBar beacon connect error * feat: add option to sign out & redirect to prev page on sign in * chore: remove redundant marketplace js file * feat: gate marketplace & profile view with auth * feat: add logic for calculating estimated gas fee * feat: add logic for withdrawing owned bot from sale * fix: remove buy button incase bot is not available for sale * feat: show estimated gas fee for withdrawing bot from sale. * feat: add logic for putting bot on sale * feat: estimating gas fee for withdrawal & putting bot on sale * refactor: cryptobot view * Fix gas fee estimate error for buying a bot from the marketplace. + Show tick mark icon as user progress throw the transaction. * feat: add confetti Co-authored-by: Bhaskar Singh <[email protected]> Co-authored-by: Manan Gouhari <[email protected]>
- Loading branch information
1 parent
4d678f7
commit 0acd8b9
Showing
26 changed files
with
19,025 additions
and
45,668 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -1,6 +1,3 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
plugins: [require('tailwindcss')], | ||
}; |
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,6 +1,7 @@ | ||
import userAtom from './user-atom'; | ||
import { atom } from 'jotai'; | ||
|
||
//TODO: Also check that wallet is present & account is verified | ||
const isUserAtom = atom(get => Object.keys(get(userAtom)).length > 0); | ||
|
||
export default isUserAtom; |
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,51 @@ | ||
import React from 'react'; | ||
import model from 'src/images/Col-1.png'; | ||
import { Link } from 'gatsby'; | ||
import { convertMutezToXtz, getXTZPriceInUSD } from 'src/utils/indexer'; | ||
|
||
function CryptobotCard({ bot, xtzPrice, owned }) { | ||
return ( | ||
<div className="bg-base-800 font-mulish h-full border-2 border-base-400 rounded-lg overflow-hidden"> | ||
<div> | ||
<model-viewer | ||
style={{ width: '100%' }} | ||
camera-controls | ||
alt="3D Cryptobot" | ||
src={`https://cloudflare-ipfs.com/ipfs/${bot.uri}`} | ||
></model-viewer> | ||
</div> | ||
<Link | ||
to={`/tezos/cryptobot`} | ||
state={{ id: bot.tokenId, bot: bot, xtzPrice: xtzPrice, owned: owned }} | ||
> | ||
<div className="p-6"> | ||
<h1 className="font-mulish text-2xl font-bold text-white mb-2"> | ||
Cryptobot (#{bot.tokenId}) | ||
</h1> | ||
{bot.isForSale ? ( | ||
<div> | ||
<p className="font-mulish text-lg font-bold mb-3 text-white"> | ||
{convertMutezToXtz(bot.saleValueInMutez)} XTZ | ||
<span> | ||
{xtzPrice ? ( | ||
<span className="text-base-100"> | ||
{' '} | ||
( $ | ||
{getXTZPriceInUSD(xtzPrice.price, bot.saleValueInMutez)} ) | ||
</span> | ||
) : null} | ||
</span> | ||
</p> | ||
</div> | ||
) : ( | ||
<p className="font-mulish font-bold mb-3 text-lg text-white"> | ||
Bot not available for sale{' '} | ||
</p> | ||
)} | ||
</div> | ||
</Link> | ||
</div> | ||
); | ||
} | ||
|
||
export default CryptobotCard; |
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,92 +1,114 @@ | ||
import React from 'react'; | ||
import { | ||
Footer, | ||
FooterInner, | ||
LinkContainer, | ||
NavigationLink, | ||
StyledOutboundLink, | ||
LOGO, | ||
} from './styled'; | ||
import { Link } from 'gatsby'; | ||
import Theme from 'src/assets/theme.svg'; | ||
import tezoslogo from '../../images/tezos_logo.png'; | ||
import buidllogo from '../../images/buidl_logo.png'; | ||
|
||
import BuidlLabsLogo from '../../images/buidl_labs_logo.png'; | ||
import Tezos from '../../images/tezos.png'; | ||
function FooterPage() { | ||
const OutboundLink = ({ href, children }) => { | ||
return ( | ||
<Footer> | ||
<FooterInner> | ||
<div> | ||
<div></div> | ||
<LOGO rel="noopener" target="_blank" href="https://tezos.com/"> | ||
<img src={Tezos} alt="tezos logo" /> | ||
<div> | ||
<h3>Tezos</h3> | ||
</div> | ||
</LOGO> | ||
<LOGO | ||
style={{ marginTop: 20 }} | ||
rel="noopener" | ||
target="_blank" | ||
href="https://buidllabs.io/" | ||
> | ||
<img | ||
style={{ marginTop: '1rem' }} | ||
src={BuidlLabsLogo} | ||
alt="build labs logo" | ||
/> | ||
<div> | ||
<h3>BUIDL</h3> | ||
<h4>LABS</h4> | ||
</div> | ||
</LOGO> | ||
<li> | ||
<a | ||
rel="noopener" | ||
target="_blank" | ||
href={href} | ||
className="font-mulish text-lg text-base-100 hover:text-white hover:no-underline" | ||
> | ||
{children} | ||
</a> | ||
</li> | ||
); | ||
}; | ||
|
||
const NavigationLink = ({ to, children }) => { | ||
return ( | ||
<li> | ||
<Link | ||
to={to} | ||
className="font-mulish text-lg text-base-100 hover:text-white hover:no-underline transition duration-400 ease-in-out" | ||
> | ||
{children} | ||
</Link> | ||
</li> | ||
); | ||
}; | ||
|
||
const Heading = ({ children }) => { | ||
return ( | ||
<h2 className="text-xl font-mulish font-bold text-white mb-3 uppercase"> | ||
{children} | ||
</h2> | ||
); | ||
}; | ||
|
||
const LinkContainer = ({ children }) => { | ||
return <div className="lg:w-1/4 md:w-1/2 w-full px-4">{children}</div>; | ||
}; | ||
|
||
const Footer = () => { | ||
return ( | ||
<footer className="bg-base-900 font-mulish"> | ||
<div className="container px-30 py-16 mx-auto flex md:items-center lg:items-start md:flex-row md:flex-nowrap flex-wrap flex-col"> | ||
<div className="flex flex-col justify-start text-white"> | ||
<Heading>Powered By</Heading> | ||
<nav className="list-none mb-8 space-y-6"> | ||
<OutboundLink href="https://tezos.com/"> | ||
<img src={tezoslogo} className="h-14 w-auto" /> | ||
</OutboundLink> | ||
<OutboundLink href="https://buidllabs.io/"> | ||
<img src={buidllogo} className="h-14 w-auto" /> | ||
</OutboundLink> | ||
</nav> | ||
</div> | ||
<div> | ||
<LinkContainer style={{ width: 200 }}> | ||
<h4>Navigation</h4> | ||
<ul> | ||
<li> | ||
<NavigationLink to="/tezos">Home Page</NavigationLink> | ||
</li> | ||
<li> | ||
<NavigationLink to="/tezos/overview"> | ||
Curriculum Overview | ||
</NavigationLink> | ||
</li> | ||
<li> | ||
<NavigationLink to="/tezos/privacy-policy"> | ||
Privacy Policy | ||
</NavigationLink> | ||
</li> | ||
</ul> | ||
<div className="flex-grow flex flex-row flex-wrap md:pl-20 -mb-10 md:mt-0 mt-10 md:text-left text-center justify-end"> | ||
<LinkContainer> | ||
<Heading>Navigation</Heading> | ||
<nav className="list-none mb-8"> | ||
<NavigationLink to={`/tezos`}>Home</NavigationLink> | ||
<NavigationLink to={`/tezos/academy`}>Academy</NavigationLink> | ||
<NavigationLink to={`/tezos/marketplace`}> | ||
Marketplace | ||
</NavigationLink> | ||
<NavigationLink to="/tezos/auth">Sign In</NavigationLink> | ||
</nav> | ||
</LinkContainer> | ||
|
||
<LinkContainer> | ||
<Heading>Legal</Heading> | ||
<nav className="list-none mb-10"> | ||
<NavigationLink to="/tezos/privacy-policy"> | ||
Privacy Policy | ||
</NavigationLink> | ||
<NavigationLink to="/tezos/home"> | ||
Terms and Conditions | ||
</NavigationLink> | ||
</nav> | ||
</LinkContainer> | ||
|
||
<LinkContainer> | ||
<h4>Social</h4> | ||
<ul> | ||
<li> | ||
<StyledOutboundLink | ||
rel="noopener" | ||
target="_blank" | ||
href="https://github.com/buidl-labs/crypto-code-school-inside-tezos" | ||
> | ||
Github | ||
</StyledOutboundLink> | ||
</li> | ||
<li> | ||
<StyledOutboundLink | ||
rel="noopener" | ||
target="_blank" | ||
href="https://t.me/joinchat/Q4N7fRQPfT1YQvNL1G3xOw" | ||
> | ||
Telegram | ||
</StyledOutboundLink> | ||
</li> | ||
{/* <li>ProductHunt</li> */} | ||
</ul> | ||
<Heading>Social</Heading> | ||
<nav className="list-none mb-10"> | ||
<OutboundLink href="https://github.com/buidl-labs/crypto-code-school-inside-tezos"> | ||
Github | ||
</OutboundLink> | ||
<OutboundLink href="https://t.me/joinchat/Q4N7fRQPfT1YQvNL1G3xOw"> | ||
Telegram | ||
</OutboundLink> | ||
</nav> | ||
</LinkContainer> | ||
</div> | ||
</FooterInner> | ||
<p>2020 | Made with ❤️ by people @ BUIDL Labs</p> | ||
</Footer> | ||
</div> | ||
<div className="bg-gray-800 bg-opacity-75"> | ||
<div className="container mx-auto py-8 px-5 flex flex-col justify-center"> | ||
<p className="text-white text-xl text-center"> | ||
2020 | Made with ❤️ by people @ | ||
<a href="https://buidllabs.io/" className="underline"> | ||
BUIDL Labs | ||
</a> | ||
</p> | ||
</div> | ||
</div> | ||
</footer> | ||
); | ||
} | ||
}; | ||
|
||
export default FooterPage; | ||
export default Footer; |
Oops, something went wrong.