Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/remove redundant imports from examples #13062

Merged
merged 35 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0963456
Removed the redundant import and named the home function
todortotev May 18, 2020
a7bb74a
Changed to arrow function
todortotev May 18, 2020
0cb206a
Removed the redundant imports and named the functions
todortotev May 18, 2020
ada8b08
Named the home page function
todortotev May 18, 2020
540a585
Removed redundant imports and named the home function
todortotev May 18, 2020
7d93d15
Named the functions
todortotev May 18, 2020
3a8fe35
Removed redundant react import
todortotev May 18, 2020
f1135d4
Removed redundant react import
todortotev May 18, 2020
0e31055
Removed redundant react import
todortotev May 18, 2020
cf85be5
Removed redundant react imports
todortotev May 18, 2020
fa999c6
forgot that one
todortotev May 18, 2020
c9238a6
removed redundant imports and removed braces from single argument fun…
todortotev May 18, 2020
81bbcfb
removed redundant imports
todortotev May 18, 2020
366d245
forgot that one
todortotev May 18, 2020
b5aa9c0
removed redundant imports
todortotev May 18, 2020
175ca6e
removed redundant react import
todortotev May 18, 2020
2f44f61
removed redundant react imports
todortotev May 18, 2020
66bfa8e
removed redundant imports
todortotev May 18, 2020
45714bb
removed redundant import and named the home function
todortotev May 18, 2020
bfb0ff8
removed redundant imports
todortotev May 18, 2020
a98ba0a
forgot that one
todortotev May 18, 2020
4fd2bfe
more redundant react imports, seems like everyone is doing it lol
todortotev May 18, 2020
4ff15d4
another import
todortotev May 18, 2020
573d281
removed yet another import
todortotev May 18, 2020
19a0001
Named the function instead of being annonymous
todortotev May 18, 2020
3753429
More redundant imports
todortotev May 18, 2020
bc6dbec
Update index.js
todortotev May 18, 2020
2fcc353
Update index.js
todortotev May 18, 2020
c0646df
Merge branch 'canary' into feat/remove-redundant-imports-from-examples
Timer May 20, 2020
321f426
Revert index.js
Timer May 20, 2020
b10f716
lint
Timer May 20, 2020
d407d02
Merge branch 'canary' into feat/remove-redundant-imports-from-examples
ijjk May 20, 2020
1768983
Re-add expected react imports
ijjk May 20, 2020
2234557
Merge remote-tracking branch 'upstream/canary' into feat/remove-redun…
ijjk May 20, 2020
93e2914
Merge branch 'canary' into feat/remove-redundant-imports-from-examples
kodiakhq[bot] May 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/amp-first/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import Layout from '../components/Layout'
import AmpState from '../components/amp/AmpState'
import AmpScript from '../components/amp/AmpScript'
Expand Down
1 change: 0 additions & 1 deletion examples/amp-first/pages/offline.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import Layout from '../components/Layout'

export const config = { amp: true }
Expand Down
1 change: 0 additions & 1 deletion examples/with-aphrodite/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { StyleSheet, css } from 'aphrodite'

if (typeof window !== 'undefined') {
Expand Down
2 changes: 0 additions & 2 deletions examples/with-app-layout/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

const Layout = ({ children }) => <div className="layout">{children}</div>

export default function App({ Component, pageProps }) {
Expand Down
4 changes: 2 additions & 2 deletions examples/with-aws-amplify/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react'
import { useReducer } from 'react'
import { API, graphqlOperation } from 'aws-amplify'
import nanoid from 'nanoid'
import produce from 'immer'
Expand Down Expand Up @@ -74,7 +74,7 @@ const deleteToDo = async (dispatch, id) => {
}
}
const App = (props) => {
const [state, dispatch] = React.useReducer(reducer, {
const [state, dispatch] = useReducer(reducer, {
todos: props.todos,
currentName: '',
})
Expand Down
1 change: 0 additions & 1 deletion examples/with-aws-amplify/pages/todo/[id].js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from 'react'
import { API, graphqlOperation } from 'aws-amplify'

import { getTodo } from '../../src/graphql/queries'
Expand Down
1 change: 0 additions & 1 deletion examples/with-babel-macros/pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import Document, { Head, Main, NextScript } from 'next/document'

export default class MyDocument extends Document {
Expand Down
1 change: 0 additions & 1 deletion examples/with-babel-macros/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import preval from 'preval.macro'

const whoami = preval`
Expand Down
2 changes: 1 addition & 1 deletion examples/with-carbon-components/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component, Fragment } from 'react'
import { Component, Fragment } from 'react'
import { Button } from 'carbon-components-react'

export default class DemoApp extends Component {
Expand Down
1 change: 0 additions & 1 deletion examples/with-cerebral/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { Controller } from 'cerebral'
import Devtools from 'cerebral/devtools'
import { Container } from '@cerebral/react'
Expand Down
1 change: 0 additions & 1 deletion examples/with-cerebral/pages/other.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { Controller } from 'cerebral'
import Devtools from 'cerebral/devtools'
import { Container } from '@cerebral/react'
Expand Down
1 change: 0 additions & 1 deletion examples/with-chakra-ui/src/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import NextApp from 'next/app'
import { ThemeProvider, CSSReset, ColorModeProvider } from '@chakra-ui/core'

Expand Down
1 change: 0 additions & 1 deletion examples/with-chakra-ui/src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { withTheme } from 'emotion-theming'
import {
Link as ChakraLink,
Expand Down
1 change: 0 additions & 1 deletion examples/with-chakra-ui/src/theme.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { theme as chakraTheme } from '@chakra-ui/core'

const fonts = { ...chakraTheme.fonts, mono: `'Menlo', monospace` }
Expand Down
1 change: 0 additions & 1 deletion examples/with-cookie-auth-fauna/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import Layout from '../components/layout'

const Home = () => (
Expand Down
2 changes: 1 addition & 1 deletion examples/with-cookie-auth-fauna/pages/login.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import Router from 'next/router'
import Layout from '../components/layout'

Expand Down
2 changes: 1 addition & 1 deletion examples/with-cookie-auth-fauna/pages/signup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import Router from 'next/router'
import Layout from '../components/layout'

Expand Down
5 changes: 2 additions & 3 deletions examples/with-custom-babel-config/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'

export default class MyLuckNo extends React.Component {
import { Component } from 'react'
export default class MyLuckNo extends Component {
constructor(...args) {
super(...args)
this.state = { randomNo: null }
Expand Down
1 change: 0 additions & 1 deletion examples/with-glamor/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { rehydrate } from 'glamor'

// Adds server generated styles to glamor cache.
Expand Down
1 change: 0 additions & 1 deletion examples/with-graphql-hooks/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import App from 'next/app'
import React from 'react'
import withGraphQLClient from '../lib/with-graphql-client'
import { ClientContext } from 'graphql-hooks'

Expand Down
1 change: 0 additions & 1 deletion examples/with-grommet/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import App from 'next/app'
import { Grommet, grommet as grommetTheme } from 'grommet'

Expand Down
1 change: 0 additions & 1 deletion examples/with-grommet/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { Anchor, Box, Heading, Paragraph } from 'grommet'

export default function Home() {
Expand Down
1 change: 0 additions & 1 deletion examples/with-i18n-rosetta/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import I18n from '../lib/i18n'

export default function MyApp({ Component, pageProps }) {
Expand Down
1 change: 0 additions & 1 deletion examples/with-jest/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Head from 'next/head'
import React from 'react'
import styles from './index.module.css'

const Home = () => (
Expand Down