-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3742e3f
commit 34ba67e
Showing
7 changed files
with
70 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,12 @@ import '@near-wallet-selector/modal-ui/styles.css'; | |
import 'react-bootstrap-typeahead/css/Typeahead.css'; | ||
import 'react-bootstrap-typeahead/css/Typeahead.bs5.css'; | ||
|
||
import { openToast, Toaster } from '@near-pagoda/ui'; | ||
import { openToast, PagodaUiProvider, Toaster } from '@near-pagoda/ui'; | ||
import Gleap from 'gleap'; | ||
import type { AppProps } from 'next/app'; | ||
import dynamic from 'next/dynamic'; | ||
import Head from 'next/head'; | ||
import Link from 'next/link'; | ||
import { useRouter } from 'next/router'; | ||
import Script from 'next/script'; | ||
import { useEffect } from 'react'; | ||
|
@@ -23,13 +24,13 @@ import { useClickTracking } from '@/hooks/useClickTracking'; | |
import { useHashUrlBackwardsCompatibility } from '@/hooks/useHashUrlBackwardsCompatibility'; | ||
import { usePageAnalytics } from '@/hooks/usePageAnalytics'; | ||
import { useAuthStore } from '@/stores/auth'; | ||
import { useCookieStore } from '@/stores/cookieData'; | ||
import { useResearchWizardStore } from '@/stores/researchWizard'; | ||
import { init as initializeAnalytics, recordHandledError, setReferrer } from '@/utils/analytics'; | ||
import { gleapSdkToken } from '@/utils/config'; | ||
import { setNotificationsLocalStorage } from '@/utils/notificationsLocalStorage'; | ||
import type { NextPageWithLayout } from '@/utils/types'; | ||
import { styleZendesk } from '@/utils/zendesk'; | ||
import { useResearchWizardStore } from '@/stores/researchWizard'; | ||
import { useCookieStore } from '@/stores/cookieData'; | ||
|
||
const VmInitializer = dynamic(() => import('../components/vm/VmInitializer'), { | ||
ssr: false, | ||
|
@@ -113,53 +114,61 @@ export default function App({ Component, pageProps }: AppPropsWithLayout) { | |
} else { | ||
Gleap.showFeedbackButton(true); | ||
} | ||
}, [isResearchFormDismissed, cookieData, gleapSdkToken]); | ||
}, [isResearchFormDismissed, cookieData]); | ||
|
||
useEffect(() => { | ||
checkCookieData(); | ||
}, [checkCookieData]); | ||
|
||
return ( | ||
<> | ||
<Head> | ||
<meta name="google-site-verification" content="CDEVFlJTyVZ2vM7ePugKgWsl_7Rd-MrfDv42u0vZ0B0" /> | ||
<link rel="icon" href="favicon.ico" /> | ||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_HOSTNAME}${router.asPath}`} key="canonical" /> | ||
<link rel="manifest" href="manifest.json" /> | ||
</Head> | ||
|
||
<Script id="phosphor-icons" src="https://unpkg.com/@phosphor-icons/web" async /> | ||
|
||
<Script id="bootstrap" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" /> | ||
|
||
<VmInitializer /> | ||
|
||
{getLayout(<Component {...pageProps} />)} | ||
|
||
<Toaster /> | ||
|
||
<CookiePrompt /> | ||
|
||
<ResearchFormWizard /> | ||
|
||
<div | ||
id="idos_container" | ||
style={ | ||
!router.route.startsWith('/settings') | ||
? ({ | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
width: 0, | ||
height: 0, | ||
margin: 0, | ||
padding: 0, | ||
opacity: 0, | ||
overflow: 'hidden', | ||
} as React.CSSProperties) | ||
: undefined | ||
} | ||
/> | ||
<PagodaUiProvider | ||
value={{ | ||
routerPrefetch: router.prefetch, | ||
routerPush: router.push, | ||
Link, | ||
}} | ||
> | ||
<Head> | ||
<meta name="google-site-verification" content="CDEVFlJTyVZ2vM7ePugKgWsl_7Rd-MrfDv42u0vZ0B0" /> | ||
<link rel="icon" href="favicon.ico" /> | ||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_HOSTNAME}${router.asPath}`} key="canonical" /> | ||
<link rel="manifest" href="manifest.json" /> | ||
</Head> | ||
|
||
<Script id="phosphor-icons" src="https://unpkg.com/@phosphor-icons/web" async /> | ||
|
||
<Script id="bootstrap" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" /> | ||
|
||
<VmInitializer /> | ||
|
||
{getLayout(<Component {...pageProps} />)} | ||
|
||
<Toaster /> | ||
|
||
<CookiePrompt /> | ||
|
||
<ResearchFormWizard /> | ||
|
||
<div | ||
id="idos_container" | ||
style={ | ||
!router.route.startsWith('/settings') | ||
? ({ | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
width: 0, | ||
height: 0, | ||
margin: 0, | ||
padding: 0, | ||
opacity: 0, | ||
overflow: 'hidden', | ||
} as React.CSSProperties) | ||
: undefined | ||
} | ||
/> | ||
</PagodaUiProvider> | ||
</> | ||
); | ||
} |