Skip to content

Commit

Permalink
Merge pull request #159 from map3xyz/fix/theme
Browse files Browse the repository at this point in the history
fix(theme): light bg is transparent
  • Loading branch information
plondon authored Mar 13, 2023
2 parents 738677c + d7ed7c9 commit aea61f2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Layout = ({
return (
<motion.div
animate={{ opacity: 1, scale: 1 }}
className={`map3 absolute overflow-hidden rounded-md border dark:border-primary-700 dark:bg-primary-900`}
className={`map3 absolute overflow-hidden rounded-md border bg-white dark:border-primary-700 dark:bg-primary-900`}
exit={{ opacity: 0 }}
initial={{ opacity: 0, scale: 0.5 }}
style={{
Expand Down
30 changes: 19 additions & 11 deletions src/hooks/useWatchedAddressProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ export const useWatchedAddressProgress = () => {

const [removeWatchedAddress] = useRemoveWatchedAddressMutation();

const handleConfirmed = (address: string) => {
dispatch({
payload: {
data: '🚀 Transaction confirmed!',
status: 'success',
step: 'Confirmed',
},
type: 'SET_TX',
});
removeWatchedAddress({
variables: { watchedAddressId: address },
});
};

const run = async (
payload: WatchAddressPayload,
address: string,
Expand Down Expand Up @@ -55,6 +69,10 @@ export const useWatchedAddressProgress = () => {
const requiredBlock = payload.new.tx_block_height + MIN_CONFIRMATIONS;
const remainingBlocks = Math.max(0, requiredBlock - currentBlock);
const remainingBlocksText = remainingBlocks === 1 ? 'block' : 'blocks';
if (remainingBlocks === 0) {
handleConfirmed(address);
return;
}
dispatch({
payload: {
data: `Current block height: ${currentBlock}. ${remainingBlocks} more ${remainingBlocksText} required for confirmation.`,
Expand All @@ -65,17 +83,7 @@ export const useWatchedAddressProgress = () => {
});
break;
case 'confirmed':
dispatch({
payload: {
data: '🚀 Transaction confirmed!',
status: 'success',
step: 'Confirmed',
},
type: 'SET_TX',
});
removeWatchedAddress({
variables: { watchedAddressId: address },
});
handleConfirmed(address);
break;
}
};
Expand Down
4 changes: 3 additions & 1 deletion src/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ root.render(
},
},
style: {
theme: 'dark',
embed: {
id: 'supercharge',
},
},
},
userId: 'preview-user-id',
Expand Down

0 comments on commit aea61f2

Please sign in to comment.