Merge branch 'develop' into badge-integration

This commit is contained in:
Serkan Reis
2023-02-23 09:47:05 +03:00
committed by GitHub
10 changed files with 323 additions and 36 deletions
+83
View File
@@ -0,0 +1,83 @@
import { useRef, useState } from 'react'
import { Button } from './Button'
export interface IncomeDashboardDisclaimerProps {
creatorAddress: string
}
export const IncomeDashboardDisclaimer = (props: IncomeDashboardDisclaimerProps) => {
const [isChecked, setIsChecked] = useState(false)
const checkBoxRef = useRef<HTMLInputElement>(null)
const handleCheckBox = () => {
checkBoxRef.current?.click()
}
return (
<div>
<input className="modal-toggle" defaultChecked={false} id="my-modal-1" ref={checkBoxRef} type="checkbox" />
<label className="cursor-pointer modal" htmlFor="my-modal-1">
<label
className="absolute top-[25%] bottom-5 left-1/3 max-w-[600px] max-h-[450px] border-2 no-scrollbar modal-box"
htmlFor="temp"
>
{/* <Alert type="warning"></Alert> */}
<div className="text-xl font-bold">
<div className="text-sm font-thin">
The tool provided on this website is for informational purposes only and does not constitute tax, legal or
financial advice. The information provided by the tool is not intended to be used for tax planning, tax
avoidance, promoting, marketing or related purposes. Users should consult their own tax, legal or
financial advisors prior to acting on any information provided by the tool. By clicking accept below, you
agree that neither Stargaze Foundation or Public Awesome, LLC or any of its directors, officers,
employees, or advisors shall be responsible for any errors, omissions, or inaccuracies in the information
provided by the tool, and shall not be liable for any damages, losses, or expenses arising out of or in
connection with the use of the tool. Furthermore, you agree to indemnify Stargaze Foundation, Public
Awesome, LLC and any of its directors, officers, employees and advisors against any claims, suits, or
actions related to your use of the tool.
</div>
<br />
<div className="flex flex-row pb-4">
<label className="flex flex-col space-y-1" htmlFor="terms">
<span className="text-sm font-light text-white">I agree with the terms above.</span>
</label>
<input
checked={isChecked}
className="p-2 mb-1 ml-2"
id="terms"
name="terms"
onClick={() => setIsChecked(!isChecked)}
type="checkbox"
/>
</div>
<br />
Are you sure to proceed to the Creator Income Dashboard?
</div>
<div className="flex justify-end w-full">
<Button className="px-0 mt-4 mr-5 mb-4 max-h-12 bg-gray-600 hover:bg-gray-600">
<label
className="w-full h-full text-white bg-gray-600 hover:bg-gray-500 border-0 btn modal-button"
htmlFor="my-modal-1"
>
Go Back
</label>
</Button>
<a
className="my-4"
href={
isChecked
? `https://metabase.constellations.zone/public/dashboard/4d751721-51ab-46ff-ad27-075ec8d47a17?creator_address=${props.creatorAddress}&chart_granularity_(day%252Fweek%252Fmonth)=week`
: undefined
}
rel="noopener"
target="_blank"
>
<Button className="px-5 w-full h-full" isDisabled={!isChecked} onClick={() => handleCheckBox()}>
Confirm
</Button>
</a>
</div>
</label>
</label>
</div>
)
}
+3
View File
@@ -1,5 +1,6 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
import clsx from 'clsx'
import { Anchor } from 'components/Anchor'
import { useWallet } from 'contexts/wallet'
@@ -8,6 +9,7 @@ import { useRouter } from 'next/router'
// import BrandText from 'public/brand/brand-text.svg'
import { footerLinks, socialsLinks } from 'utils/links'
import { BADGE_HUB_ADDRESS, BASE_FACTORY_ADDRESS } from '../utils/constants'
import { Conditional } from './Conditional'
import { SidebarLayout } from './SidebarLayout'
@@ -27,6 +29,7 @@ export const Sidebar = () => {
{/* wallet button */}
<WalletLoader />
{/* main navigation routes */}
<div className="absolute top-[20%] left-[5%]">
<ul className="group p-2 w-full bg-transparent menu rounded-box">
<li tabIndex={0}>
-18
View File
@@ -22,7 +22,6 @@ export const ACTION_TYPES = [
'update_per_address_limit',
'update_collection_info',
'freeze_collection_info',
'withdraw',
'transfer',
'batch_transfer',
'burn',
@@ -60,11 +59,6 @@ export const BASE_ACTION_LIST: ActionListItem[] = [
name: 'Freeze Collection Info',
description: `Freeze collection info to prevent further updates`,
},
{
id: 'withdraw',
name: 'Withdraw Tokens',
description: `Withdraw tokens from the contract`,
},
{
id: 'transfer',
name: 'Transfer Tokens',
@@ -153,11 +147,6 @@ export const VENDING_ACTION_LIST: ActionListItem[] = [
name: 'Freeze Collection Info',
description: `Freeze collection info to prevent further updates`,
},
{
id: 'withdraw',
name: 'Withdraw Tokens',
description: `Withdraw tokens from the contract`,
},
{
id: 'transfer',
name: 'Transfer Tokens',
@@ -224,7 +213,6 @@ export type DispatchExecuteArgs = {
| { type: Select<'update_start_trading_time'>; startTime?: string }
| { type: Select<'update_per_address_limit'>; limit: number }
| { type: Select<'shuffle'> }
| { type: Select<'withdraw'> }
| { type: Select<'transfer'>; recipient: string; tokenId: number }
| { type: Select<'batch_transfer'>; recipient: string; tokenIds: string }
| { type: Select<'burn'>; tokenId: number }
@@ -284,9 +272,6 @@ export const dispatchExecute = async (args: DispatchExecuteArgs) => {
case 'shuffle': {
return vendingMinterMessages.shuffle(txSigner)
}
case 'withdraw': {
return vendingMinterMessages.withdraw(txSigner)
}
case 'transfer': {
return sg721Messages.transferNft(args.recipient, args.tokenId.toString())
}
@@ -365,9 +350,6 @@ export const previewExecutePayload = (args: DispatchExecuteArgs) => {
case 'shuffle': {
return vendingMinterMessages(minterContract)?.shuffle()
}
case 'withdraw': {
return vendingMinterMessages(minterContract)?.withdraw()
}
case 'transfer': {
return sg721Messages(sg721Contract)?.transferNft(args.recipient, args.tokenId.toString())
}