Skip to content

Commit

Permalink
analytics -> speedInsights
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l committed Apr 10, 2024
1 parent 4c7af86 commit cb6b454
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 40 deletions.
4 changes: 2 additions & 2 deletions Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ migrate_ryo421 = "sozo -P ryo421 build && sozo -P ryo421 migrate apply && scarb
migrate_prod = "sozo -P prod migrate"

# slot ryo420
slot_ryo420_katana="slot d create ryo420 katana --seed 420 --version v0.6.0 --chain-id KATANA_SLOT_420"
slot_ryo420_katana="slot d create ryo420 katana --seed 420 --version v0.6.0 --chain-id KATANA_SLOT_420 --disable-fee true"
slot_ryo420_torii="slot d create ryo420 torii --rpc https://api.cartridge.gg/x/ryo420/katana -s 0 --version v0.6.0 --world 0x3bf84ccc82282acd4c8afbb843c9e864bf1e0770fba607595104202b938b7a4"

# slot ryo421
slot_ryo421_katana="slot d create ryo421 katana --seed 421 --version v0.6.0 --chain-id KATANA_SLOT_421"
slot_ryo421_katana="slot d create ryo421 katana --seed 421 --version v0.6.0 --chain-id KATANA_SLOT_421 --disable-fee true"
slot_ryo421_torii="slot d create ryo421 torii --rpc https://api.cartridge.gg/x/ryo421/katana -s 0 --version v0.6.0 --world 0x3bf84ccc82282acd4c8afbb843c9e864bf1e0770fba607595104202b938b7a4"


Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@next/bundle-analyzer": "^14.1.4",
"@starknet-react/chains": "^0.1.7",
"@starknet-react/core": "^2.4.0",
"@vercel/analytics": "^1.0.2",
"@vercel/speed-insights": "^1.0.10",
"eslint": "8.36.0",
"eslint-config-next": "14.1.4",
"framer-motion": "^10.5.0",
Expand Down
38 changes: 28 additions & 10 deletions web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions web/src/components/layout/MobileMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Menu, MenuItem, Popover, PopoverBody, PopoverContent, PopoverTrigger, StyleProps } from "@chakra-ui/react";
import { Dots } from "../icons";
import { ProfileLinkMobile } from "../pages/profile/Profile";
import { ChainSelector, ConnectButtonMobile } from "../wallet";
import { Burners } from "../wallet/Burners";
import { Predeployed } from "../wallet/Predeployed";
import { ConnectButtonMobile } from "../wallet";
import { HeaderButton } from "./HeaderButton";
import { MediaPlayer } from "./MediaPlayer";

Expand All @@ -24,11 +22,11 @@ export const MobileMenu = ({ ...props }: StyleProps) => {
</MenuItem>
<ProfileLinkMobile />
<ConnectButtonMobile />
<MenuItem>
{/* <MenuItem>
<ChainSelector/>
<Burners />
<Predeployed />
</MenuItem>
</MenuItem> */}
</Menu>
</PopoverBody>
</PopoverContent>
Expand Down
28 changes: 14 additions & 14 deletions web/src/components/wallet/ConnectButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useDojoContext } from "@/dojo/hooks";
import { frenlyAddress } from "@/utils/ui";
import { useDojoContext, useTokenBalance } from "@/dojo/hooks";
import { formatEther, frenlyAddress } from "@/utils/ui";
import { Box, Button, HStack, Image, MenuItem, Text } from "@chakra-ui/react";
import { useAccount, /*useBalance,*/ useConnect, useDisconnect } from "@starknet-react/core";

Expand All @@ -9,10 +9,10 @@ export const ConnectButton = ({ ...props }) => {
const { disconnect } = useDisconnect();
const { uiStore } = useDojoContext();

// const { balance } = useTokenBalance({
// address,
// token: "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
// });
const { balance } = useTokenBalance({
address,
token: "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
});

return (
<>
Expand All @@ -35,10 +35,10 @@ export const ConnectButton = ({ ...props }) => {
<HStack>
{connector && <Image src={connector.icon.dark} width="24px" height="24px" alt={connector.name} />}
<Text>{frenlyAddress(account.address || "")}</Text>
{/* <HStack gap={1}>
<HStack gap={1}>
<Text fontFamily="monospace">Ξ</Text>
<Text>{formatEther(balance)}</Text>
</HStack> */}
</HStack>
</HStack>
</Button>
)}
Expand All @@ -53,10 +53,10 @@ export const ConnectButtonMobile = ({ ...props }) => {
const { disconnect } = useDisconnect();
const { uiStore } = useDojoContext();

// const { balance } = useTokenBalance({
// address,
// token: "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
// });
const { balance } = useTokenBalance({
address,
token: "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
});

return (
<>
Expand All @@ -70,10 +70,10 @@ export const ConnectButtonMobile = ({ ...props }) => {
<HStack w="full" justifyContent="center">
{connector && <Image src={connector.icon.dark} width="24px" height="24px" alt={connector.name} />}
<Text>{frenlyAddress(account.address || "")}</Text>
{/* <HStack gap={1}>
<HStack gap={1}>
<Text fontFamily="monospace">Ξ</Text>
<Text>{formatEther(balance)}</Text>
</HStack> */}
</HStack>
</HStack>
</MenuItem>
)}
Expand Down
12 changes: 6 additions & 6 deletions web/src/dojo/hooks/useSystems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ export const useSystems = (): SystemsInterface => {
isError: false
})

//
// TODO : remove later
//
await sleep(1_000);
// clearToasts()
// //
// // TODO : remove later
// //
// await sleep(1_000);
// // clearToasts()

receipt = await account!.waitForTransaction(tx.transaction_hash, {
retryInterval: 200,
retryInterval: 500,
});
} catch (e: any) {
setIsPending(false)
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useKonamiCode, { starkpimpSequence } from "@/hooks/useKonamiCode";
import Fonts from "@/theme/fonts";
import GlobalStyles from "@/theme/global";
import { ChakraProvider } from "@chakra-ui/react";
import { Analytics } from "@vercel/analytics/react";
import { SpeedInsights } from '@vercel/speed-insights/next';
import type { AppProps } from "next/app";
import NextHead from "next/head";
import { useEffect } from "react";
Expand Down Expand Up @@ -43,7 +43,7 @@ export default function App({ Component, pageProps }: AppProps) {
</NextHead>
{isRightSequence && <MakeItRain />}
<Component {...pageProps} />
<Analytics />
<SpeedInsights />
{/* <Debug /> */}

{/* Common modales */}
Expand Down

0 comments on commit cb6b454

Please sign in to comment.