Skip to content

Commit

Permalink
build: add ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
antoine-giret committed Mar 8, 2024
1 parent 69be271 commit fb7c112
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gatsby-ssr.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { ChakraBaseProvider } from '@chakra-ui/react';
import { WrapPageElementBrowserArgs, WrapRootElementBrowserArgs } from 'gatsby';
import React from 'react';
import 'maplibre-gl/dist/maplibre-gl.css';

import Layout from './src/layout';
import theme from './src/theme';

export function wrapPageElement(props: WrapPageElementBrowserArgs) {
return <Layout {...props} />;
}

export function wrapRootElement({ element }: WrapRootElementBrowserArgs) {
return <ChakraBaseProvider theme={theme}>{element}</ChakraBaseProvider>;
}

0 comments on commit fb7c112

Please sign in to comment.