mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Improvement: Fix lint issues
This commit is contained in:
parent
88adc95232
commit
d0b167f24d
@ -132,7 +132,8 @@ exports.createPages = ({ graphql, actions }) => {
|
||||
await createSwaggerPages(createPage)
|
||||
|
||||
// API: ocean.js
|
||||
const lastRelease = result.data.oceanJs.repository.releases.edges.filter(
|
||||
const lastRelease =
|
||||
result.data.oceanJs.repository.releases.edges.filter(
|
||||
({ node }) =>
|
||||
!node.isPrerelease &&
|
||||
!node.isDraft &&
|
||||
|
@ -122,7 +122,10 @@ export default class Sidebar extends Component {
|
||||
{sidebarfile.map((group, i) => (
|
||||
<div key={i}>
|
||||
{collapsed ? (
|
||||
group.items.some((item) => location.pathname.startsWith(item.link)) ? (
|
||||
group.items.some(
|
||||
(item) =>
|
||||
location.pathname.substring(0, item.link.length) === item.link
|
||||
) ? (
|
||||
<SidebarGroup
|
||||
i={i}
|
||||
group={group}
|
||||
|
@ -2,9 +2,8 @@ import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import MarkdownTemplate from '../MarkdownTemplate'
|
||||
import sidebarStyles from '../../components/Sidebar.module.scss'
|
||||
import moduleStyles from '../../components/Sidebar.module.scss'
|
||||
import { generatedNestedObject } from './utils'
|
||||
import { navigate } from 'gatsby'
|
||||
import { navigate, graphql } from 'gatsby'
|
||||
import ContentWrapperTemplate from '../ContentWrapperTemplate'
|
||||
|
||||
export default function MarkdownList({ data, location, pageContext }) {
|
||||
@ -41,7 +40,7 @@ export default function MarkdownList({ data, location, pageContext }) {
|
||||
|
||||
const generateModuleListElement = (id, label) => {
|
||||
const className =
|
||||
selectedModule.id === id ? moduleStyles.active : moduleStyles.link
|
||||
selectedModule.id === id ? sidebarStyles.active : sidebarStyles.link
|
||||
|
||||
return (
|
||||
<li key={id} id={id} style={{ cursor: 'pointer' }}>
|
||||
@ -94,7 +93,6 @@ export default function MarkdownList({ data, location, pageContext }) {
|
||||
toc={nestedSidebarList}
|
||||
>
|
||||
<MarkdownTemplate data={selectedModule} />
|
||||
|
||||
</ContentWrapperTemplate>
|
||||
</>
|
||||
)
|
||||
@ -102,10 +100,10 @@ export default function MarkdownList({ data, location, pageContext }) {
|
||||
|
||||
MarkdownList.propTypes = {
|
||||
pageContext: PropTypes.object.isRequired,
|
||||
location: PropTypes.object.isRequired
|
||||
location: PropTypes.object.isRequired,
|
||||
data: PropTypes.object
|
||||
}
|
||||
|
||||
|
||||
export const MarkdownListQuery = graphql`
|
||||
query {
|
||||
allSectionsYaml {
|
||||
@ -118,5 +116,4 @@ export const MarkdownListQuery = graphql`
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
`
|
||||
|
Loading…
Reference in New Issue
Block a user