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

Upgrade Dependencies and get react hooks working #2203

Merged
merged 9 commits into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
8 changes: 4 additions & 4 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
"net": "^1.0.2",
"network-speed": "^2.0.3",
"next": "^8.0.3",
"next-i18next": "^0.36.5",
"next-i18next": "^2.1.1",
"next-images": "^1.1.1",
"next-plugin-transpile-modules": "^2.0.0",
"nuka-carousel": "git://github.com/cmcewen/nuka-carousel#fee86bf",
"react": "^16.9.0",
"nuka-carousel": "^4.5.13",
"react": "16.9.0",
"react-apollo": "^2.5.8",
"react-autosuggest": "^9.4.3",
"react-debounce-input": "^3.2.0",
"react-dom": "^16.9.0",
"react-dom": "16.9.0",
"react-google-recaptcha": "^1.1.0",
"react-is": "^16.8.6",
"react-lazyload": "^2.5.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/web/src/brandkit/Color.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import { withNamespaces } from 'react-i18next'
import { ImageBackground, ImageRequireSource, StyleSheet, Text, View } from 'react-native'
import Palette from 'src/brandkit/color/Palette'
import { brandStyles } from 'src/brandkit/common/constants'
Expand All @@ -13,7 +12,7 @@ import Page from 'src/brandkit/common/Page'
import PageHeadline from 'src/brandkit/common/PageHeadline'
import SectionTitle from 'src/brandkit/common/SectionTitle'
import Judgement, { Value } from 'src/brandkit/logo/Judgement'
import { I18nProps, NameSpaces } from 'src/i18n'
import { I18nProps, NameSpaces, withNamespaces } from 'src/i18n'
import { ScreenProps, ScreenSizes, withScreenSize } from 'src/layout/ScreenSize'
import { hashNav } from 'src/shared/menu-items'
import { colors, fonts, standardStyles } from 'src/styles'
Expand Down
7 changes: 2 additions & 5 deletions packages/web/src/brandkit/IconsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import * as React from 'react'
import { withNamespaces } from 'react-i18next'
import { StyleSheet, Text, View } from 'react-native'

import { brandStyles, GAP } from 'src/brandkit/common/constants'
import Fetch from 'src/brandkit/common/Fetch'
import Page from 'src/brandkit/common/Page'
import PageHeadline from 'src/brandkit/common/PageHeadline'
import { I18nProps, NameSpaces, Trans } from 'src/i18n'

import Fetch from 'src/brandkit/common/Fetch'
import IconShowcase from 'src/brandkit/common/Showcase'
import { I18nProps, NameSpaces, Trans, withNamespaces } from 'src/i18n'
import InlineAnchor from 'src/shared/InlineAnchor'
import { CeloLinks, hashNav } from 'src/shared/menu-items'
import { fonts, standardStyles } from 'src/styles'
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/brandkit/KeyImagery.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as React from 'react'
import { withNamespaces } from 'react-i18next'
import { StyleSheet, Text, View } from 'react-native'
import { Text } from 'react-native'
import Page from 'src/brandkit/common/Page'
import { NameSpaces, withNamespaces } from 'src/i18n'
import { hashNav } from 'src/shared/menu-items'

const { brandImagery } = hashNav

// TODO in v 1.1
const KeyImageryWrapped = withNamespaces()(
const KeyImageryWrapped = withNamespaces(NameSpaces.brand)(
React.memo(function KeyImagery() {
return (
<Page
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/header/Header.3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import throttle from 'lodash.throttle'
import dynamic from 'next/dynamic'
import { SingletonRouter as Router, withRouter } from 'next/router'
import * as React from 'react'
import { WithNamespaces, withNamespaces } from 'react-i18next'
import { Animated, Dimensions, Easing, StyleSheet, View } from 'react-native'
import BlueBanner, { BANNER_HEIGHT, styles as bannerStyle } from 'src/header/BlueBanner'
import BlueBanner, { styles as bannerStyle } from 'src/header/BlueBanner'
import cssStyles from 'src/header/Header.3.scss'
import { I18nProps, withNamespaces } from 'src/i18n'
import MediumLogo from 'src/icons/MediumLogo'
import Octocat from 'src/icons/Octocat'
import LogoDarkBg from 'src/logos/LogoDarkBg'
Expand Down Expand Up @@ -37,7 +37,7 @@ interface OwnProps {
router: Router
}

type Props = OwnProps & WithNamespaces
type Props = OwnProps & I18nProps

interface State {
showDesktopMenu: boolean
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/home/version3/HomeWork.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as React from 'react'
import { WithNamespaces, withNamespaces } from 'react-i18next'
import { StyleSheet, View } from 'react-native'
import Fade from 'react-reveal/Fade'
import { H1 } from 'src/fonts/Fonts'
import { I18nProps, withNamespaces } from 'src/i18n'
import { Cell, GridRow, Spans } from 'src/layout/GridRow'
import Button, { BTN, SIZE } from 'src/shared/Button.3'
import menuItems from 'src/shared/menu-items'
import { standardStyles, textStyles } from 'src/styles'

type Props = WithNamespaces
type Props = I18nProps

class HomeWork extends React.PureComponent<Props> {
render() {
Expand Down
10 changes: 5 additions & 5 deletions packages/web/src/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import NextI18Next, { I18nProps as i18nProps } from 'next-i18next'
import NextI18Next, { I18n, TFunction } from 'next-i18next'

const options = { defaultLanguage: 'en', otherLanguages: ['en'], saveMissing: false }
const NextI18NextInstance = new NextI18Next(options)

export const Trans = NextI18NextInstance.Trans

export interface I18nProps {
t: i18nProps['t']
i18n: i18nProps['i18n']
t: TFunction
i18n: I18n
}

export default NextI18NextInstance
export const { appWithTranslation, withNamespaces } = NextI18NextInstance
export const { appWithTranslation, withTranslation } = NextI18NextInstance
export const withNamespaces = withTranslation

export enum NameSpaces {
common = 'common',
Expand Down
57 changes: 0 additions & 57 deletions packages/web/src/next-i18next-aug.d.ts

This file was deleted.

Loading