Skip to content

Commit

Permalink
initialise bridge deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennievon committed May 30, 2024
1 parent 297ada4 commit f1aa4b5
Show file tree
Hide file tree
Showing 93 changed files with 2 additions and 6,068 deletions.
14 changes: 0 additions & 14 deletions contracts/src/bridge/frontend/api/general.ts

This file was deleted.

90 changes: 0 additions & 90 deletions contracts/src/bridge/frontend/api/index.ts

This file was deleted.

This file was deleted.

70 changes: 0 additions & 70 deletions contracts/src/bridge/frontend/artifacts/IBridge.sol/IBridge.json

This file was deleted.

38 changes: 0 additions & 38 deletions contracts/src/bridge/frontend/pages/404.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions contracts/src/bridge/frontend/pages/500.tsx

This file was deleted.

90 changes: 1 addition & 89 deletions contracts/src/bridge/frontend/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,93 +1,5 @@
import { useState } from "react";
import { ThemeProvider } from "@/src/components/providers/theme-provider";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import {
QueryClient,
MutationCache,
QueryClientProvider,
} from "@tanstack/react-query";
import "@/styles/globals.css";
import type { AppProps } from "next/app";
import { Toaster } from "@/src/components/ui/toaster";
import { WalletProvider } from "@/src/components/providers/wallet-provider";
import { NetworkStatus } from "@/src/components/modules/common/network-status";
import HeadSeo from "@/src/components/head-seo";
import { siteMetadata } from "@/src/lib/siteMetadata";
import Script from "next/script";
import { GOOGLE_ANALYTICS_ID } from "@/src/lib/constants";
import { showToast } from "@/src/components/ui/use-toast";
import { ToastType } from "@/src/types";

export default function App({ Component, pageProps }: AppProps) {
const mutationCache = new MutationCache({
onSuccess: (mutation: any) => {
if (mutation?.message) {
showToast(ToastType.SUCCESS, mutation?.message);
}
},
onError: (error: any, mutation: any) => {
if (error?.response?.data?.message) {
showToast(ToastType.DESTRUCTIVE, error?.response?.data?.message);
}
},
});

const [queryClient] = useState(
() =>
new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
staleTime: 300000,
},
},
mutationCache,
})
);

return (
<>
<Script
strategy="lazyOnload"
src={`https://www.googletagmanager.com/gtag/js?id='${GOOGLE_ANALYTICS_ID}'`}
/>

<Script strategy="lazyOnload" id="google-analytics">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${GOOGLE_ANALYTICS_ID}');
`}
</Script>

<HeadSeo
title={`${siteMetadata.companyName} `}
description={siteMetadata.description}
canonicalUrl={`${siteMetadata.siteUrl}`}
ogImageUrl={siteMetadata.siteLogo}
ogTwitterImage={siteMetadata.siteLogo}
ogType={"website"}
>
<link rel="icon" href="/static/favicon.ico" />
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.json" />
</HeadSeo>
<QueryClientProvider client={queryClient}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<WalletProvider>
<Component {...pageProps} />
<Toaster />
<NetworkStatus />
<ReactQueryDevtools initialIsOpen={false} />
</WalletProvider>
</ThemeProvider>
</QueryClientProvider>
</>
);
return <Component {...pageProps} />;
}
Loading

0 comments on commit f1aa4b5

Please sign in to comment.