Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
napindc committed Jul 17, 2022
1 parent caf1d01 commit 5e2f12a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 33 deletions.
4 changes: 1 addition & 3 deletions src/components/WhitelistCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ function WhitelistCard({
<p>Type </p>
<p>{type.toUpperCase()}</p>


{/* #391: ---- ADDED myLiveDAO to only show spots left*/}
{ myLiveDAO ?
isFcfs ?
(<>
Expand Down Expand Up @@ -315,7 +313,7 @@ function WhitelistCard({
setClaiming(false);
}
}}
hidden={iMod || !myLiveDAO}
hidden={iMod || !myLiveDAO}
disabled={ expired || claiming || claimed || full || showLive || isDemo||tabButton == 'live'}
>
{getClaimButtonText(expired,claiming,claimed, full, claims, showLive)}
Expand Down
59 changes: 29 additions & 30 deletions src/pages/bots/WhitelistMarketplace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function WhitelistMarketplace() {
const params = new URLSearchParams(window.location.search);
const code = params.get('code') || '';
// const discordId = params.get('state');
let searchParam = window.location.search.slice(10,28)
let searchParam = ''; // window.location.search.slice(10,28);

const [twitterId, setTwitterId] = useState('');
const [isLoading, setIsLoading] = useState(true);
Expand Down Expand Up @@ -221,35 +221,34 @@ function WhitelistMarketplace() {
</ul>

{/* show twitter login button only when never logged in yet */}
{/*TODO: !!! TWITTER BROKE -@@@@ aries...*/}
{/*<div hidden={code?.length > 0 || twitterId?.length > 0}>*/}
{/* <br/>*/}
{/* <IonButton className='mb-0 h-11' color={ mode === 'dark' ? '' : "dark"}*/}
{/* onClick={() => {*/}
{/* instance*/}
{/* .post(*/}
{/* '/twitter-auth-url',*/}
{/* {*/}
{/* headers: {*/}
{/* 'Content-Type': 'application/json',*/}
{/* },*/}
{/* }*/}
{/* )*/}
{/* .then(({ data }) => {*/}
{/* window.location.href = data.authUrl;*/}
{/* })*/}
{/* .catch((e) => {*/}
{/* console.error(e);*/}
{/* present({*/}
{/* message: 'Twitter login failed',*/}
{/* color: 'error',*/}
{/* duration: 10000,*/}
{/* });*/}
{/* })*/}
{/* }} >*/}
{/* <IonIcon icon={logoTwitter} className="big-emoji mr-3"/> Login with Twitter*/}
{/* </IonButton>*/}
{/*</div>*/}
<div hidden={code?.length > 0 || twitterId?.length > 0}>
<br/>
<IonButton className='mb-0 h-11' color={ mode === 'dark' ? '' : "dark"}
onClick={() => {
instance
.post(
'/twitter-auth-url',
{
headers: {
'Content-Type': 'application/json',
},
}
)
.then(({ data }) => {
window.location.href = data.authUrl;
})
.catch((e) => {
console.error(e);
present({
message: 'Twitter login failed',
color: 'error',
duration: 10000,
});
})
}} >
<IonIcon icon={logoTwitter} className="big-emoji mr-3"/> Login with Twitter
</IonButton>
</div>

</div>
</div>
Expand Down

0 comments on commit 5e2f12a

Please sign in to comment.