Skip to content

Commit

Permalink
Merge branch 'armando/grwth-3682-upgrade-posthog' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
r3lays committed Dec 6, 2023
2 parents c58fc10 + 76780b0 commit ff7d5c9
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 47 deletions.
23 changes: 7 additions & 16 deletions components/buttons/Mint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, {
useContext,
} from 'react'
import { useConnectModal } from '@rainbow-me/rainbowkit'
import { CollectModal, CollectStep } from '@reservoir0x/reservoir-kit-ui'
import { MintStep, MintModal } from '@reservoir0x/reservoir-kit-ui'
import { useMarketplaceChain } from 'hooks'
import { CSS } from '@stitches/react'
import { Button } from 'components/primitives'
Expand All @@ -20,7 +20,7 @@ type Props = {
buttonProps?: ComponentProps<typeof Button>
buttonChildren?: ReactNode
mutate?: SWRResponse['mutate']
openState?: ComponentPropsWithoutRef<typeof CollectModal>['openState']
openState?: ComponentPropsWithoutRef<typeof MintModal>['openState']
}

const Mint: FC<Props> = ({
Expand All @@ -35,35 +35,26 @@ const Mint: FC<Props> = ({
const { openConnectModal } = useConnectModal()
const marketplaceChain = useMarketplaceChain()
const { feesOnTop } = useContext(ReferralContext)
const contract = collectionId?.split(':')?.[0]
const token = tokenId ? `${contract}:${tokenId}` : undefined

return (
<CollectModal
<MintModal
trigger={
<Button css={buttonCss} color="primary" {...buttonProps}>
{buttonChildren}
</Button>
}
collectionId={collectionId}
tokenId={tokenId}
mode={'mint'}
token={token}
openState={openState}
feesOnTopUsd={feesOnTop}
chainId={marketplaceChain.id}
onConnectWallet={() => {
openConnectModal?.()
}}
onClose={(data, currentStep) => {
if (mutate && currentStep == CollectStep.Complete) mutate()
}}
onPointerDownOutside={(e) => {
const privyLayer = document.getElementById('privy-dialog')

const clickedInsidePrivyLayer =
privyLayer && e.target ? privyLayer.contains(e.target as Node) : false

if (clickedInsidePrivyLayer) {
e.preventDefault()
}
if (mutate && currentStep == MintStep.Complete) mutate()
}}
/>
)
Expand Down
18 changes: 3 additions & 15 deletions components/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,28 +135,16 @@ const Navbar = () => {

<HoverCard.Root openDelay={200}>
<HoverCard.Trigger>
<NavItem>Trending</NavItem>
<NavItem>Trending</NavItem>
</HoverCard.Trigger>
<HoverCard.Content sideOffset={24} align="start">
<Card css={{ p: 24, width: 240, border: '1px solid $gray4' }}>
<Flex css={{ gap: '$4' }} direction="column">
<Link href={`/${routePrefix}/collections/trending`}>
<NavItem
css={{
fontWeight: 'normal',
}}
>
Collections
</NavItem>
<NavItem>Collections</NavItem>
</Link>
<Link href={`/${routePrefix}/mints/trending`}>
<NavItem
css={{
fontWeight: 'normal',
}}
>
Mints
</NavItem>
<NavItem>Mints</NavItem>
</Link>
</Flex>
</Card>
Expand Down
2 changes: 1 addition & 1 deletion components/rankings/MintRankingsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ const headings = [
'Mint Price',
'Floor Price',
'Total Mints',
'1H Mints',
'1h Mints',
'6h Mints',
'Recent Mints',
]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"@radix-ui/react-toggle-group": "^1.0.1",
"@radix-ui/react-tooltip": "1.0.6",
"@rainbow-me/rainbowkit": "^1.1.3",
"@reservoir0x/reservoir-kit-ui": "1.20.0",
"@reservoir0x/reservoir-kit-ui": "1.21.0",
"@sentry/nextjs": "^7.53.1",
"@types/uuid": "^9.0.1",
"dayjs": "^1.11.6",
"framer-motion": "^6.3.6",
"lodash": "^4.17.21",
"next": "13.0",
"openapi-typescript-fetch": "^1.1.3",
"posthog-js": "^1.68.4",
"posthog-js": "^1.93.6",
"react": "^18.0",
"react-dom": "^18.0",
"react-hotkeys-hook": "^4.0.4",
Expand Down
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1435,10 +1435,10 @@
dependencies:
"@react-hookz/deep-equal" "^1.0.3"

"@reservoir0x/reservoir-kit-ui@1.20.0":
version "1.20.0"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-kit-ui/-/reservoir-kit-ui-1.20.0.tgz#4650597d9334ab7a3b9c53e83ef5ae20d29e9f63"
integrity sha512-ieV/f2b4eMOp2FYdIBLF2vqOUEGmN3dlQGflqq8MrtjKk3GBy6BPi6upvGivnO8bsVjzKH/36ueIcQNkXAG9sA==
"@reservoir0x/reservoir-kit-ui@1.21.0":
version "1.21.0"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-kit-ui/-/reservoir-kit-ui-1.21.0.tgz#e36aadf4414a53081fe04e5199eec2113b3377b3"
integrity sha512-0OViceR3s9vl/ZaCZevyuxlIpXh3DfRR9e4r35QHlzkqok7uyxEX3mc5D/iVXVBMnvGzzY+PNNHyJflgpofmEw==
dependencies:
"@fortawesome/fontawesome-svg-core" "^6.1.1"
"@fortawesome/free-solid-svg-icons" "^6.1.1"
Expand All @@ -1454,18 +1454,18 @@
"@radix-ui/react-toggle-group" "1.0.4"
"@radix-ui/react-tooltip" "1.0.6"
"@react-hookz/web" "^19.2.0"
"@reservoir0x/reservoir-sdk" "1.9.2"
"@reservoir0x/reservoir-sdk" "1.10.0"
"@stitches/react" "1.3.1-1"
dayjs "^1.11.4"
flatpickr "^4.6.13"
framer-motion "^6.4.2"
react-flatpickr "^3.10.13"
swr "2.0.1"

"@reservoir0x/reservoir-sdk@1.9.2":
version "1.9.2"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-sdk/-/reservoir-sdk-1.9.2.tgz#02f19d9fa19ca8f6bd60bc4fbaf3d699cbb06bf0"
integrity sha512-5OHQmkJX9mxR2idQypnLgfV44FojyVZ3REQ9Yue46oT24xr51Q4HdlnmqTuaBaVLeCycXK2Vn7CnNOOASf+Nyg==
"@reservoir0x/reservoir-sdk@1.10.0":
version "1.10.0"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-sdk/-/reservoir-sdk-1.10.0.tgz#972c1f427d0ab0e070f1e5c6484a2ed9f257ef4c"
integrity sha512-VeSx6nDUfCnyEpQL0sOo+U4qAa2pvFUk0vBQdPc2P57RGBs4Ze+xIqP3oj0OcaRavaMeoFrIHK522/nEoSLsBw==
dependencies:
axios "^0.27.2"

Expand Down Expand Up @@ -4310,10 +4310,10 @@ [email protected]:
picocolors "^1.0.0"
source-map-js "^1.0.2"

posthog-js@^1.68.4:
version "1.68.4"
resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.68.4.tgz#c9ec6edc8f6f274970d4f05c4ffa3a2564581b1a"
integrity sha512-rHk4uk99nvWiDTU7P2mFdEfzFR6km0hvOpCR3tm/+F7kCJKs7QDkMblOZZHZultxM4wSNyB4neeohmnHjKYUhQ==
posthog-js@^1.93.6:
version "1.93.6"
resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.93.6.tgz#e9524e55305b5df40c1fedb971d33f420ac80e33"
integrity sha512-Jou2awqQH5PDtDe9hZxpe9PO4D0uUOU7eA1lGni4pBxJckeA94P7WF3ieQj355xY96ZcXVQmGJykypO/FyBvpQ==
dependencies:
fflate "^0.4.1"

Expand Down

0 comments on commit ff7d5c9

Please sign in to comment.