mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +02:00
Merge pull request #102 from the-programmers-hangout/refact-extract-layout-components
refact: extract layout components to the layouts directory
This commit is contained in:
@@ -5,21 +5,18 @@
|
||||
* See: https://www.gatsbyjs.org/docs/use-static-query/
|
||||
*/
|
||||
|
||||
import { RouteComponentProps } from '@reach/router'
|
||||
import { RouteComponentProps } from "@reach/router"
|
||||
import React, { FC, Fragment } from "react"
|
||||
|
||||
import { Container } from "../../components/Container"
|
||||
import { Footer } from "../../components/Footer"
|
||||
import { Header } from "../../components/Header"
|
||||
import { WavesBottom } from "../../components/Waves"
|
||||
import { GlobalStyles } from "../../globalStyles"
|
||||
import { ThemeProvider } from "../../ThemeProvider"
|
||||
import { Container } from "../Container"
|
||||
import { Footer } from "../Footer"
|
||||
import { Header } from "../Header"
|
||||
import { WavesBottom } from "../Waves"
|
||||
import * as SC from "./styles"
|
||||
|
||||
export const Layout: FC<RouteComponentProps> = ({
|
||||
children,
|
||||
location,
|
||||
}) => {
|
||||
export const Layout: FC<RouteComponentProps> = ({ children, location }) => {
|
||||
const isHome = location ? location.pathname === "/" : false
|
||||
|
||||
return (
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
import React, { FC, useState } from "react"
|
||||
|
||||
import { MobileHeader } from "../../components/MobileHeader"
|
||||
import { ResourcesSidebar } from "../../components/ResourcesSidebar"
|
||||
import { GlobalStyles } from "../../globalStyles"
|
||||
import { SidebarProvider } from "../../SidebarProvider"
|
||||
import { ThemeProvider } from "../../ThemeProvider"
|
||||
import { MobileHeader } from "../MobileHeader"
|
||||
import { ResourcesSidebar } from "../ResourcesSidebar"
|
||||
import * as SC from "./styles"
|
||||
|
||||
export const ResourcesLayout: FC = ({ children }) => {
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { PropsWithChildren } from "react"
|
||||
import { Layout } from "../components/Layout"
|
||||
import { ResourcesLayout } from "../components/ResourcesLayout"
|
||||
import { Layout } from "./Layout"
|
||||
import { ResourcesLayout } from "./ResourcesLayout"
|
||||
|
||||
export default function BaseLayout({
|
||||
children,
|
||||
|
||||
Reference in New Issue
Block a user