Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bicstone committed Jun 16, 2023
1 parent 3c0eaa2 commit ee7a83b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 20 deletions.
15 changes: 0 additions & 15 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
"@/hooks": path.resolve("src/hooks"),
"@/utils": path.resolve("src/utils"),
"@/layouts": path.resolve("src/layouts"),
"@/slides": path.resolve("src/slides"),
},
},
});
Expand Down Expand Up @@ -71,7 +70,6 @@ export const onPreBootstrap: GatsbyNode["onPreBootstrap"] = async ({

/**
* Create blog post pages
* Create slices
*/
export const createPages: GatsbyNode["createPages"] = async ({
graphql,
Expand Down Expand Up @@ -124,19 +122,6 @@ export const createPages: GatsbyNode["createPages"] = async ({
reporter.success(
`createPages: Created ${blogPostList.length} blog post pages`
);

actions.createSlice({
// XXX: Build fails when constants are set
id: "HEADER",
component: path.resolve(process.cwd(), "src", "slices", "Header.tsx"),
});

actions.createSlice({
id: "FOOTER",
component: path.resolve(process.cwd(), "src", "slices", "Footer.tsx"),
});

reporter.success(`createPages: Created slices`);
};

/**
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions src/layouts/WrapPageElement.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import styled from "@emotion/styled";
import { Slice } from "gatsby";

import Footer from "./Footer";
import Header from "./Header";

import type { ReactNode } from "react";

Expand All @@ -19,9 +21,9 @@ export const WrapPageElement = (props: {

return (
<>
<Slice alias="HEADER" />
<Header />
<StyledMain>{children}</StyledMain>
<Slice alias="FOOTER" />
<Footer />
</>
);
};
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
"@/generated/*": ["src/generated/*"],
"@/hooks/*": ["src/hooks/*"],
"@/utils/*": ["src/utils/*"],
"@/layouts/*": ["src/layouts/*"],
"@/slides/*": ["src/slices/*"]
"@/layouts/*": ["src/layouts/*"]
} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
Expand Down

0 comments on commit ee7a83b

Please sign in to comment.