Skip to content

Commit

Permalink
Revert import sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
iAdramelk committed Jan 15, 2020
1 parent 76941ba commit c731ae8
Show file tree
Hide file tree
Showing 36 changed files with 163 additions and 139 deletions.
5 changes: 2 additions & 3 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import React from 'react'
import Document, { Head, Main, NextScript } from 'next/document'
import { ServerStyleSheet } from 'styled-components'
import {
META_BASE_TITLE,
META_DESCRIPTION,
META_KEYWORDS,
META_SOCIAL_IMAGE
} from '../src/consts'

import React from 'react'
import { ServerStyleSheet } from 'styled-components'

const inject = str => (
<div className="inject" dangerouslySetInnerHTML={{ __html: str }} />
)
Expand Down
4 changes: 2 additions & 2 deletions pages/api/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* potential ability to cache comments count in the future.
*/

import { BLOG_URL, FORUM_URL } from '../../src/consts'

import Cors from 'micro-cors'
import request from 'request'

import { BLOG_URL, FORUM_URL } from '../../src/consts'

const cors = Cors({
allowedMethods: ['GET', 'HEAD'],
origin: BLOG_URL
Expand Down
24 changes: 13 additions & 11 deletions pages/doc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
/* global docsearch:readonly */

import React, { useCallback, useEffect, useState } from 'react'
import { getItemByPath, structure } from '../src/utils/sidebar'

import Error from 'next/error'
import Hamburger from '../src/Hamburger'
import { HeadInjector } from '../src/Documentation/HeadInjector'
import Markdown from '../src/Documentation/Markdown/Markdown'
import Page from '../src/Page'
import PropTypes from 'prop-types'
import RightPanel from '../src/Documentation/RightPanel/RightPanel'
import styled from 'styled-components'
import Error from 'next/error'
import Router from 'next/router'
import SearchForm from '../src/SearchForm'
import SidebarMenu from '../src/Documentation/SidebarMenu/SidebarMenu'
import fetch from 'isomorphic-fetch'
import kebabCase from 'lodash.kebabcase'
// components
import Page from '../src/Page'
import { HeadInjector } from '../src/Documentation/HeadInjector'
import Hamburger from '../src/Hamburger'
import SearchForm from '../src/SearchForm'
import SidebarMenu from '../src/Documentation/SidebarMenu/SidebarMenu'
import Markdown from '../src/Documentation/Markdown/Markdown'
import RightPanel from '../src/Documentation/RightPanel/RightPanel'
// sidebar data and helpers
import { getItemByPath, structure } from '../src/utils/sidebar'
// styles
import { media } from '../src/styles'
import styled from 'styled-components'

const ROOT_ELEMENT = 'bodybag'
const SIDEBAR_MENU = 'sidebar-menu'
Expand Down
17 changes: 10 additions & 7 deletions pages/features.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import FeaturesHero from '../src/FeaturesHero'
import Head from 'next/head'
import Hero from '../src/Hero'
import { META_BASE_TITLE } from '../src/consts'
import Page from '../src/Page'
import React from 'react'
import TrySection from '../src/TrySection'
import styled from 'styled-components'

import Head from 'next/head'

import { container } from '../src/styles'
import { media } from '../src/styles'
import styled from 'styled-components'

import Page from '../src/Page'
import Hero from '../src/Hero'
import FeaturesHero from '../src/FeaturesHero'
import TrySection from '../src/TrySection'
import { META_BASE_TITLE } from '../src/consts'

const HeadInjector = () => (
<Head>
Expand Down
16 changes: 9 additions & 7 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import Diagram from '../src/Diagram'
import React from 'react'
import styled from 'styled-components'
import Head from 'next/head'
import Hero from '../src/Hero'
import LandingHero from '../src/LandingHero'

import LearnMore from '../src/LearnMore'
import { META_BASE_TITLE } from '../src/consts'

import Page from '../src/Page'
import Hero from '../src/Hero'
import LandingHero from '../src/LandingHero'
import Diagram from '../src/Diagram'
import PromoSection from '../src/PromoSection'
import React from 'react'
import Subscribe from '../src/Subscribe'
import UseCases from '../src/UseCases'
import styled from 'styled-components'
import Subscribe from '../src/Subscribe'
import { META_BASE_TITLE } from '../src/consts'

const HeadInjector = () => (
<Head>
Expand Down
18 changes: 10 additions & 8 deletions pages/support.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { OnlyDesktop, container, media } from '../src/styles'
import React from 'react'
import styled from 'styled-components'
import { Mark } from '../src/styles'
import color from 'color'

import Head from 'next/head'
import Hero from '../src/Hero'
import { META_BASE_TITLE } from '../src/consts'
import { Mark } from '../src/styles'

import { OnlyDesktop, container, media } from '../src/styles'

import Page from '../src/Page'
import Popover from '../src/Popover/Popover'
import React from 'react'
import Hero from '../src/Hero'
import TrySection from '../src/TrySection'
import color from 'color'
import styled from 'styled-components'
import Popover from '../src/Popover/Popover'
import { META_BASE_TITLE } from '../src/consts'

const HeadInjector = () => (
<Head>
Expand Down
3 changes: 2 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
*/

const { createServer } = require('http')
const next = require('next')
const { parse } = require('url')
const next = require('next')

const { getItemByPath } = require('./src/utils/sidebar')

const dev = process.env.NODE_ENV !== 'production'
Expand Down
9 changes: 4 additions & 5 deletions src/Diagram/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/* eslint jsx-a11y/anchor-is-valid: off */

import React, { Component } from 'react'
import PropTypes from 'prop-types'
import NextLink from 'next/link'
import styled from 'styled-components'
import {
OnlyDesktop,
OnlyMobile,
Expand All @@ -8,13 +12,8 @@ import {
container,
media
} from '../styles'
import React, { Component } from 'react'

import { Element } from 'react-scroll'
import NextLink from 'next/link'
import PropTypes from 'prop-types'
import Slider from 'react-slick'
import styled from 'styled-components'

const LearnMore = ({ href }) => (
<LearnMoreArea>
Expand Down
3 changes: 2 additions & 1 deletion src/Documentation/HeadInjector.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Head from 'next/head'
import { META_BASE_TITLE } from '../consts'
import PropTypes from 'prop-types'
import React from 'react'

import { META_BASE_TITLE } from '../consts'

export const HeadInjector = ({ sectionName = 'Documentation' }) => (
<Head>
<title>
Expand Down
37 changes: 21 additions & 16 deletions src/Documentation/Markdown/Markdown.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
import Collapsible from 'react-collapsible'
import { LightButton } from '../LightButton'
import NextLink from 'next/link'
import { PAGE_DOC } from '../../consts'
import PropTypes from 'prop-types'
import React from 'react'
import ReactMarkdown from 'react-markdown'
import PropTypes from 'prop-types'
import NextLink from 'next/link'
import Router from 'next/router'
import { Light as SyntaxHighlighter } from 'react-syntax-highlighter'
import Tooltip from '../../Tooltip'
// components
import ReactMarkdown from 'react-markdown'
import { LightButton } from '../LightButton'
import Tutorials from '../Tutorials'
import Tooltip from '../../Tooltip'
import Collapsible from 'react-collapsible'
// syntax highlighter
import { Light as SyntaxHighlighter } from 'react-syntax-highlighter'
import { docco } from 'react-syntax-highlighter/dist/cjs/styles/hljs'
import python from 'react-syntax-highlighter/dist/cjs/languages/hljs/python'
import yaml from 'react-syntax-highlighter/dist/cjs/languages/hljs/yaml'
import ini from 'react-syntax-highlighter/dist/cjs/languages/hljs/ini'
import bash from 'react-syntax-highlighter/dist/cjs/languages/hljs/bash'
import diff from 'react-syntax-highlighter/dist/cjs/languages/hljs/diff'
import { docco } from 'react-syntax-highlighter/dist/cjs/styles/hljs'
import vim from 'react-syntax-highlighter/dist/cjs/languages/hljs/vim'
import usage from './lang/usage'
import dvc from './lang/dvc'
import ini from 'react-syntax-highlighter/dist/cjs/languages/hljs/ini'
import kebabCase from 'lodash.kebabcase'
import linker from './utils/remark-linker'
import { media } from '../../../src/styles'
import python from 'react-syntax-highlighter/dist/cjs/languages/hljs/python'
// consts
import { PAGE_DOC } from '../../consts'
// utils
import kebabCase from 'lodash.kebabcase'
// styles
import styled from 'styled-components'
import usage from './lang/usage'
import vim from 'react-syntax-highlighter/dist/cjs/languages/hljs/vim'
import yaml from 'react-syntax-highlighter/dist/cjs/languages/hljs/yaml'
import { media } from '../../../src/styles'

SyntaxHighlighter.registerLanguage('dvc', dvc)
SyntaxHighlighter.registerLanguage('python', python)
Expand Down
2 changes: 1 addition & 1 deletion src/Documentation/Markdown/utils/remark-linker.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;`use strict`

import { getItemByPath } from '../../../utils/sidebar'
import visit from 'unist-util-visit'
import { getItemByPath } from '../../../utils/sidebar'

const DVC_REGEXP = /dvc\s+[a-z][a-z-.]*/
const COMMAND_REGEXP = /^[a-z][a-z-]*$/
Expand Down
7 changes: 4 additions & 3 deletions src/Documentation/RightPanel/RightPanel.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { LightButton } from '../LightButton'
import PropTypes from 'prop-types'
import React from 'react'
import Tutorials from '../Tutorials'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { LightButton } from '../LightButton'
import Tutorials from '../Tutorials'
// utils
import throttle from 'lodash.throttle'

const ROOT_ELEMENT = 'bodybag'
Expand Down
18 changes: 11 additions & 7 deletions src/Documentation/SidebarMenu/SidebarMenu.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import { OnlyDesktop, media } from '../../styles'
import React, { useEffect, useRef, useState } from 'react'

import DownloadButton from '../../DownloadButton'
import NextLink from 'next/link'
import { PAGE_DOC } from '../../consts'
import PerfectScrollbar from 'perfect-scrollbar'
import scrollIntoView from 'dom-scroll-into-view'
import PropTypes from 'prop-types'
import { getParentsListFromPath } from '../../utils/sidebar'
import NextLink from 'next/link'
// consts
import { PAGE_DOC } from '../../consts'
// components
import DownloadButton from '../../DownloadButton'
// utils
import includes from 'lodash.includes'
import scrollIntoView from 'dom-scroll-into-view'
// styles
import styled from 'styled-components'
import { OnlyDesktop, media } from '../../styles'
// sidebar helpers
import { getParentsListFromPath } from '../../utils/sidebar'

/** Height of each menu child items (to calc Element weight for animations) */
const heightMap = {}
Expand Down
7 changes: 4 additions & 3 deletions src/Documentation/Tutorials.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { LightButton } from './LightButton'
import PropTypes from 'prop-types'
import React from 'react'
import PropTypes from 'prop-types'
import topairs from 'lodash.topairs'
import startCase from 'lodash.startcase'
import styled from 'styled-components'
import topairs from 'lodash.topairs'

import { LightButton } from './LightButton'

export default function Tutorials({ compact, tutorials }) {
const tutorialsData = topairs(tutorials)
Expand Down
2 changes: 1 addition & 1 deletion src/DownloadButton/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import styled, { css } from 'styled-components'

import PropTypes from 'prop-types'
import isClient from '../utils/isClient'
import { logEvent } from '../utils/ga'

Expand Down
7 changes: 3 additions & 4 deletions src/Footer/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { columns, container, media } from '../styles'

import NextLink from 'next/link'
import PropTypes from 'prop-types'
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import NextLink from 'next/link'
import { columns, container, media } from '../styles'

const SocialLink = ({ src, href, children }) => (
<Link src={src} href={href}>
Expand Down
4 changes: 2 additions & 2 deletions src/Hamburger/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PropTypes from 'prop-types'
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'

const WIDTH = 30
Expand Down Expand Up @@ -55,7 +55,7 @@ const Line = styled.div`
props.open &&
props.third &&
`
transform: rotate(45deg) translate(-5px,-5px);
`};
`
8 changes: 4 additions & 4 deletions src/HamburgerMenu/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import NextLink from 'next/link'
import { media } from '../styles'

import Hamburger from '../Hamburger'
import NextLink from 'next/link'
import PropTypes from 'prop-types'
import { logEvent } from '../utils/ga'
import { media } from '../styles'
import styled from 'styled-components'

const SocialLink = ({ src, href, click, children }) => (
<Link src={src} href={href} onClick={click}>
Expand Down
4 changes: 2 additions & 2 deletions src/Hero/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types'
import React from 'react'
import { container } from '../styles'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { container } from '../styles'

export default function Hero({ children }) {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/LandingHero/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OnlyDesktop, OnlyMobile, media } from '../styles'
import React, { Component } from 'react'
import styled, { css } from 'styled-components'

import { OnlyDesktop, OnlyMobile, media } from '../styles'
import DownloadButton from '../DownloadButton'
import GithubLine from '../GithubLine'
import { logEvent } from '../utils/ga'
Expand Down
11 changes: 6 additions & 5 deletions src/Layout/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React, { useEffect } from 'react'
import { initGA, logPageView } from '../utils/ga'

import Footer from '../Footer'
import HamburgerMenu from '../HamburgerMenu'
import PropTypes from 'prop-types'
import TopMenu from '../TopMenu'
import styled from 'styled-components'
import { useRouter } from 'next/router'
// components
import TopMenu from '../TopMenu'
import Footer from '../Footer'
import HamburgerMenu from '../HamburgerMenu'
// utils
import { initGA, logPageView } from '../utils/ga'

export default function Layout({ children, enableSmoothScroll }) {
const router = useRouter()
Expand Down
Loading

0 comments on commit c731ae8

Please sign in to comment.