Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update components that use StaticQueries
- remove unneeded components whose job was to perform staticQuery and just do staticQuery in component
- Loading branch information
1 parent
202dc76
commit ebb44ac
Showing
6 changed files
with
138 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import React from "react" | ||
import { Meta, Story } from "@storybook/react/types-6-0" | ||
|
||
import { SideNavDrawerContentBase, SideNavDrawerContentBaseProps } from "components/scaffold/SideNavDrawerContent" | ||
import SideNavDrawerContent, { SideNavDrawerContentProps } from "components/scaffold/SideNavDrawerContent" | ||
|
||
export default { | ||
component: SideNavDrawerContentBase, | ||
component: SideNavDrawerContent, | ||
title: "Scaffold/SideNavDrawerContent", | ||
args: { | ||
title: "Isaiah Smith", | ||
avatar: "https://api.adorable.io/avatars/100/sample.png", | ||
}, | ||
} as Meta | ||
|
||
export const Basic: Story<SideNavDrawerContentBaseProps> = args => <SideNavDrawerContentBase {...args} /> | ||
export const Basic: Story<SideNavDrawerContentProps> = args => <SideNavDrawerContent {...args} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from "react" | ||
import { Meta, Story } from "@storybook/react/types-6-0" | ||
|
||
import About from "pages/about" | ||
|
||
export default { | ||
component: About, | ||
title: "Pages/About", | ||
} as Meta | ||
|
||
export const Basic: Story = args => <About /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React, { FC } from "react" | ||
import { Link, graphql, PageProps, useStaticQuery } from "gatsby" | ||
|
||
import Layout from "components/Layout" | ||
import SEO from "components/SEO" | ||
|
||
type AboutData = { | ||
site: { | ||
siteMetadata: { | ||
title: string | ||
} | ||
} | ||
} | ||
|
||
const About: FC<PageProps> = ({ location }) => { | ||
const data: AboutData = useStaticQuery( | ||
graphql` | ||
query AboutQuery { | ||
site { | ||
siteMetadata { | ||
title | ||
} | ||
} | ||
} | ||
` | ||
) | ||
|
||
return ( | ||
<Layout location={location} title={data.site.siteMetadata.title}> | ||
<SEO title="About" /> | ||
<p>This is my about page!</p> | ||
</Layout> | ||
) | ||
} | ||
|
||
export default About |