1
0
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:
Akshay 2021-06-21 23:50:37 +02:00
parent 88adc95232
commit d0b167f24d
3 changed files with 21 additions and 20 deletions

View File

@ -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 &&

View File

@ -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}

View File

@ -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`
}
}
}
`
`