This file contains 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
/* | |
* Authenticated user model | |
*/ | |
import './EnumUtilClass.dart'; | |
enum AccountType { REGULAR, VENDOR } | |
enum Language { EN, RU } | |
enum Privacy { PUBLIC, PRIVATE } | |
enum Roles { USER, VENDOR, ADMIN } |
This file contains 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 md5File = require('md5-file'); | |
const path = require('path'); | |
const sass = require('node-sass'); | |
// CSS styles will be imported on load and that complicates matters... ignore those bad boys! | |
const ignoreStyles = require('ignore-styles'); | |
const register = ignoreStyles.default; | |
// We also want to ignore all image requests | |
// When running locally these will load from a standard import |
This file contains 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
'use strict'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const resolve = require('resolve'); | |
const PnpWebpackPlugin = require('pnp-webpack-plugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin'); |
This file contains 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
{ | |
"name": "cra-ssr", | |
"homepage": "https://cra-ssr.herokuapp.com", | |
"version": "0.1.0", | |
"private": true, | |
"dependencies": { | |
"@babel/core": "^7.3.4", | |
"@babel/node": "^7.2.2", | |
"@babel/plugin-proposal-class-properties": "^7.3.4", | |
"@babel/plugin-proposal-object-rest-spread": "^7.3.4", |
This file contains 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 md5File = require('md5-file'); | |
const path = require('path'); | |
const sass = require('node-sass'); | |
const ignoreStyles = require('ignore-styles'); | |
const register = ignoreStyles.default; | |
const extensions = ['.gif', '.jpeg', '.jpg', '.png', '.svg']; | |
register(ignoreStyles.DEFAULT_EXTENSIONS, (mod, filename) => { | |
if (!extensions.find(f => filename.endsWith(f))) { |
This file contains 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 { bindActionCreators } from "redux"; | |
import { startClock, addCount, serverRenderClock } from "../store"; | |
import { connect } from "react-redux"; | |
class Counter extends React.Component { | |
static getInitialProps({ store, isServer }) { | |
store.dispatch(serverRenderClock(isServer)); | |
store.dispatch(addCount()); |
This file contains 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 smoothscroll from 'smoothscroll-polyfill'; | |
export const DEVICE_TYPE = { | |
MOBILE: 'mobile', | |
MOBILE_BIG: 'mobile-big', | |
TABLET: 'tablet', | |
TABLET_BIG: 'tablet-big', | |
LAPTOP: 'laptop', | |
DESKTOP: 'desktop', | |
}; |
This file contains 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
function formatMoney(amount, decimalCount = 2, decimal = '.', thousands = ',') { | |
try { | |
decimalCount = Math.abs(decimalCount); | |
decimalCount = isNaN(decimalCount) ? 2 : decimalCount; | |
const negativeSign = amount < 0 ? '-' : ''; | |
let i = parseInt((amount = Math.abs(Number(amount) || 0).toFixed(decimalCount))).toString(); | |
let j = i.length > 3 ? i.length % 3 : 0; |
This file contains 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
{ | |
"name": "charts", | |
"version": "0.1.0", | |
"private": true, | |
"dependencies": { | |
"chart.js": "^2.7.1", | |
"crypto-js": "^3.1.9-1", | |
"mobx": "^3.4.0", | |
"react": "^16.2.0", | |
"react-dom": "^16.2.0", |
This file contains 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 * as React from 'react'; | |
import axios from 'axios'; | |
import { ChartData } from 'chart.js'; | |
import ChartRT from '../../components/ChartRT'; | |
import { inject, observer } from 'mobx-react'; | |
import { ChartContainerProps, ChartRTState } from '../../interfaces'; | |
import * as ws from 'ws'; | |
@inject('store') @observer | |
class ChartRTContainer extends React.Component<ChartContainerProps, ChartRTState> { |
NewerOlder