
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 76203, | |
"imdb_id": "tt2024544", | |
"original_language": "English", | |
"original_title": "12 Years a Slave", | |
"overview": "In the pre-Civil War United States, Solomon Northup, a free black man from upstate New York, is abducted and sold into slavery. Facing cruelty as well as unexpected kindnesses Solomon struggles not only to stay alive, but to retain his dignity. In the twelfth year of his unforgettable odyssey, Solomon’s chance meeting with a Canadian abolitionist will forever alter his life.", | |
"popularity": 30.316249, | |
"score": 30.31, | |
"poster_path": "/kb3X943WMIJYVg4SOAyK0pmWL5D.jpg", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createSelector } from 'reselect'; | |
import get from 'lodash/get'; | |
const items = state => get(state, 'checkout.items', []); | |
const calcTotalPrice = ($items = []) => { | |
let total = 0; | |
$items.forEach((element) => { | |
total += get(element, '_source.price') || get(element, 'price'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Card, Button } from 'antd'; | |
import { connect } from 'react-redux'; | |
import get from 'lodash/get'; | |
import { array, number, func } from 'prop-types'; | |
import { | |
Content, Footer, Header, Container, | |
} from '../components/Layout'; | |
import Page from '../components/Page'; | |
import { removeToCart } from '../modules/actions'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import some from 'lodash/some'; | |
import AppConstants from '../utils/constants'; | |
const initialProductState = { | |
items: [], | |
totalPrice: 0, | |
}; | |
const addItems = (items = [], payload) => { | |
const newItems = items.map(item => item); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { connect } from 'react-redux'; | |
import { Button } from 'antd'; | |
import { | |
object, func, string, oneOfType, number, array, | |
} from 'prop-types'; | |
import { | |
Content, Footer, Header, Container, | |
} from '../components/Layout'; | |
import Page from '../components/Page'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Head from 'next/head'; | |
import React from 'react'; | |
import { css } from '@emotion/core'; | |
import { | |
node, string, oneOfType, object | |
} from 'prop-types'; | |
import { ReactiveBase } from '@appbaseio/reactivesearch'; | |
import mixpanel from 'mixpanel-browser'; | |
import { MixpanelProvider } from 'react-mixpanel'; | |
import { Layout } from 'antd'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const next = require('next'); | |
const port = parseInt(process.env.PORT, 10) || 3000; | |
const dev = process.env.NODE_ENV !== 'production'; | |
const app = next({ dev }); | |
const handle = app.getRequestHandler(); | |
const Cache = require('lru-cache'); | |
const ssrCache = new Cache({ | |
max: 20, // not more than 20 results will be cached |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof require !== 'undefined') { | |
require.extensions['.css'] = () => null; | |
} | |
const NextWorkboxPlugin = require('next-workbox-webpack-plugin'); | |
const withCSS = require('@zeit/next-css'); | |
const WebpackPwaManifest = require('webpack-pwa-manifest'); | |
const path = require('path'); | |
module.exports = withCSS({ | |
webpack(config, { isServer, buildId, dev }) { | |
config.node = { |
NewerOlder