-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathlayout.tsx
37 lines (31 loc) · 962 Bytes
/
layout.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"use client";
import React from "react";
import styled from "styled-components";
import "react-toastify/dist/ReactToastify.css";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ToastContainer } from "react-toastify";
import GraphqlBatcherProvider from "context/GraphqlBatcher";
import Web3Provider from "context/Web3Provider";
const Main = styled.main`
min-height: calc(100vh - 130px);
`;
const queryClient = new QueryClient();
const StyledToastContainer = styled(ToastContainer)`
padding: 16px;
padding-top: 70px;
`;
const Layout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
return (
<Web3Provider>
<QueryClientProvider client={queryClient}>
<GraphqlBatcherProvider>
<Main>
<StyledToastContainer />
{children}
</Main>
</GraphqlBatcherProvider>
</QueryClientProvider>
</Web3Provider>
);
};
export default Layout;