Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createHashHistoryWithoutKey() {
// Avoid persistence of stored data from previous tests.
window.sessionStorage.clear();
return createHashHistory({ queryKey: false });
}
render() {
const history = new HashHistory();
const liveData = new LiveData(store);
//
liveData.init();
return (
);
}
}
import NavigationContext from 'ReactNavigationContext';
import NavigatorBreadcrumbNavigationBar from 'ReactNavigatorBreadcrumbNavigationBar';
import NavigatorNavigationBar from 'ReactNavigatorNavigationBar';
import NavigatorSceneConfigs from 'ReactNavigatorSceneConfigs';
import PanResponder from 'ReactPanResponder';
import StyleSheet from 'ReactStyleSheet';
import Subscribable from './polyfills/Subscribable';
import TimerMixin from 'react-timer-mixin';
import View from 'ReactView';
import clamp from './polyfills/clamp';
import flattenStyle from 'ReactFlattenStyle';
import invariant from 'fbjs/lib/invariant';
import rebound from 'rebound';
import createHistory from 'history/lib/createHashHistory';
let history = createHistory();
let _unlisten;
// TODO: this is not ideal because there is no guarantee that the navigator
// is full screen, hwoever we don't have a good way to measure the actual
// size of the navigator right now, so this is the next best thing.
const SCREEN_WIDTH = Dimensions.get('window').width;
const SCREEN_HEIGHT = Dimensions.get('window').height;
const SCENE_DISABLED_NATIVE_PROPS = {
pointerEvents: 'none',
style: {
top: SCREEN_HEIGHT,
bottom: -SCREEN_HEIGHT,
opacity: 0,
},
};
import React from 'react';
import { Form, Input, Button, notification} from 'antd';
import createHistory from 'history/lib/createHashHistory';
import './login.less'
const FormItem = Form.Item;
const history = createHistory();
class LoginPage extends React.Component {
constructor(props) {
super(props);
}
handleSubmit = (e) => {
e.preventDefault();
let n = this.props.form.getFieldsValue().username;
let p = this.props.form.getFieldsValue().password;
if (n === 'ilovejasonbai' && p === 'ilovejasonbai') {
// 表单的路由处理
history.push('/');
} else {
this.openNotificationWithIcon('info');
}
import NavigationContext from './Navigation/NavigationContext';
import NavigatorBreadcrumbNavigationBar from './NavigatorBreadcrumbNavigationBar';
import NavigatorNavigationBar from './NavigatorNavigationBar';
import NavigatorSceneConfigs from './NavigatorSceneConfigs';
import PanResponder from '../PanResponder/PanResponder.web';
import StyleSheet from '../StyleSheet/StyleSheet.web';
import Subscribable from './polyfills/Subscribable';
import TimerMixin from 'react-timer-mixin';
import View from '../View/View.web';
import clamp from './polyfills/clamp';
import flattenStyle from '../StyleSheet/FlattenStyle.web.js';
import invariant from 'fbjs/lib/invariant';
import rebound from 'rebound';
import createHistory from 'history/lib/createHashHistory';
let history = createHistory();
let _unlisten;
// TODO: this is not ideal because there is no guarantee that the navigator
// is full screen, hwoever we don't have a good way to measure the actual
// size of the navigator right now, so this is the next best thing.
const SCREEN_WIDTH = Dimensions.get('window').width;
const SCREEN_HEIGHT = Dimensions.get('window').height;
const SCENE_DISABLED_NATIVE_PROPS = {
pointerEvents: 'none',
style: {
top: SCREEN_HEIGHT,
bottom: -SCREEN_HEIGHT,
opacity: 0
}
};
import React from 'react';
import createHistory from 'history/lib/createHashHistory';
import { Router, Route, IndexRoute, Link } from 'react-router';
let history = createHistory({
queryKey: false
});
function loadContactAsync(id){
console.log('Loading data for contact', id);
setTimeout(() => {
console.log('Data fetched!');
done();
}, 500);
}
function loadContact(nextState, replaceState){
alert('Fetch data por contact' + nextState.params.id);
}
const Layout = React.createClass({
render() {
return (
);
}
}
airbrake.addFilter(notice => {
notice.context.lender_id = kivaloans.lender_id
return notice;
});
window.addEventListener("error", airbrake.onerror);
import React from 'react'
import Reflux from 'reflux'
import ReactDOM from 'react-dom'
import Router from 'react-router'
import {Route, Redirect, IndexRoute} from 'react-router'
import {Grid,Jumbotron} from 'react-bootstrap'
import createHistory from 'history/lib/createHashHistory'
var history = createHistory({queryKey: false})
import {KLNav, KLFooter, Search, Loan, Basket, Options, About, Details, Schedule,
Criteria, ClearBasket, Live, Teams, NotFound, PromptModal, AlertModal, SnowStack,
Outdated, OnNow, Donate} from "./components"
import ga from 'react-ga';
import a from './actions'
import s from './stores'
//window.Perf = require('react-addons-perf')
window.rga = ga //react google analytics, ga is already defined
//if you want to change the page title, you will also need to change the GA rule or you'll lose all data after the change.
global.rga.event({category: 'timer', action: 'loadToStart', value: Math.round((Date.now() - window.pageStarted) / 1000)})
const App = React.createClass({
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute } from 'react-router';
import createHistory from 'history/lib/createHashHistory';
const history = createHistory({ queryKey: false });
import App from './components/App';
import Examples from './components/Examples';
const routes = (
);
ReactDOM.render(routes, document.querySelector('#app'));
constructor(props) {
super(props);
this.history = createHashHistory();
}