Skip to content

Commit

Permalink
fix: remove multiple <main> in a single page
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpou committed Sep 11, 2020
1 parent 342a6bd commit bd7467d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/Wrapper.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import styled from 'styled-components'
import { colors } from '../tokens'

const Wrapper = styled.main.attrs({
role: 'main',
})`
const Wrapper = styled.main.attrs(props => ({
role: !props.as && 'main',
}))`
position: relative;
border-radius: 5px;
width: 80%;
Expand Down
2 changes: 1 addition & 1 deletion src/templates/blog-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class BlogPostTemplate extends React.Component {
<Article post={post} />
</Wrapper>

<Wrapper>
<Wrapper as="aside">
<Disqus slug={post.frontmatter.slug} title={post.frontmatter.title} />
</Wrapper>

Expand Down
2 changes: 1 addition & 1 deletion src/templates/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default props => {
</Wrapper>

{page.frontmatter.disqus && (
<Wrapper>
<Wrapper as="aside">
<Disqus slug={page.frontmatter.slug} title={page.frontmatter.title} />
</Wrapper>
)}
Expand Down

0 comments on commit bd7467d

Please sign in to comment.