mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
removed chain connection message
This commit is contained in:
committed by
dan13ram
parent
28014c10ff
commit
4f9cfa011f
@@ -122,7 +122,6 @@ export const MegaMenuHeader: React.FC = () => {
|
||||
>
|
||||
Connect
|
||||
</MetaButton>
|
||||
<Text color="red"> Mainnet Required</Text>
|
||||
</Stack>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
@@ -95,7 +95,7 @@ export const WizardPane = <T,>({
|
||||
} = useForm();
|
||||
const current = watch(field, existing);
|
||||
const dirty = current !== existing || dirtyFields[field];
|
||||
const { connecting, connected, connect } = useWeb3();
|
||||
const { connecting, connected, connect, chainId } = useWeb3();
|
||||
const toast = useToast();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -142,14 +142,18 @@ export const WizardPane = <T,>({
|
||||
[current, field, setValue],
|
||||
);
|
||||
|
||||
if (!connecting && !connected) {
|
||||
if ((!connecting && !connected) || chainId !== '0x1') {
|
||||
return (
|
||||
<Stack mt={['-12rem', '-8rem']}>
|
||||
<Image w="min(40rem, 100%)" maxW="130%" src={cursiveTitle} />
|
||||
<Box align="center" mt="10vh ! important">
|
||||
<MetaButton onClick={connect} px={[8, 12]}>
|
||||
Connect To Progress
|
||||
</MetaButton>
|
||||
{connecting || !connected ? (
|
||||
<MetaButton onClick={connect} px={[8, 12]} isLoading={connecting}>
|
||||
Connect To Progress
|
||||
</MetaButton>
|
||||
) : (
|
||||
<Text fontSize="xl">Please switch to Mainnet to continue</Text>
|
||||
)}
|
||||
</Box>
|
||||
<Flex justify="center" mt="2rem ! important">
|
||||
<Tooltip label="Join Our Discord" hasArrow>
|
||||
|
||||
@@ -28,7 +28,7 @@ export type Web3ContextType = {
|
||||
provider: Maybe<providers.Web3Provider>;
|
||||
ceramic: Maybe<CeramicApi>;
|
||||
address: Maybe<string>;
|
||||
chainId: Maybe<number>;
|
||||
chainId: Maybe<string>;
|
||||
authToken: Maybe<string>;
|
||||
connect: () => Promise<void>;
|
||||
disconnect: () => void;
|
||||
@@ -102,7 +102,7 @@ type Web3State = {
|
||||
wallet: Maybe<Web3Modal>;
|
||||
provider: Maybe<providers.Web3Provider>;
|
||||
address: Maybe<string>;
|
||||
chainId: Maybe<number>;
|
||||
chainId: Maybe<string>;
|
||||
authToken: Maybe<string>;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
import { MegaMenu } from 'components/MegaMenu';
|
||||
import { SetupDone } from 'components/Setup/SetupDone';
|
||||
import { SetupProfile } from 'components/Setup/SetupProfile';
|
||||
import { SetupContextProvider } from 'contexts/SetupContext';
|
||||
import { InferGetStaticPropsType } from 'next';
|
||||
import React from 'react';
|
||||
|
||||
export const getStaticProps = async () => ({
|
||||
props: {
|
||||
hideTopMenu: true,
|
||||
},
|
||||
});
|
||||
|
||||
export type DefaultSetupProps = InferGetStaticPropsType<typeof getStaticProps>;
|
||||
|
||||
const SetupComplete: React.FC<DefaultSetupProps> = () => (
|
||||
const SetupComplete: React.FC = () => (
|
||||
<SetupContextProvider>
|
||||
<MegaMenu>
|
||||
<SetupProfile>
|
||||
<SetupDone />
|
||||
</SetupProfile>
|
||||
</MegaMenu>
|
||||
<SetupProfile>
|
||||
<SetupDone />
|
||||
</SetupProfile>
|
||||
</SetupContextProvider>
|
||||
);
|
||||
export default SetupComplete;
|
||||
|
||||
Reference in New Issue
Block a user