mirror of
https://github.com/strapi/strapi.git
synced 2025-10-27 16:10:08 +00:00
Remove unnecessary admin and add GraphQL logo
This commit is contained in:
parent
ad46c6b40a
commit
79e3b56a1e
File diff suppressed because one or more lines are too long
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* App actions
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* App constants
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
/**
|
|
||||||
*
|
|
||||||
* This component is the skeleton around the actual pages, and should only
|
|
||||||
* contain code that should be seen on all pages. (e.g. navigation bar)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { createStructuredSelector } from 'reselect';
|
|
||||||
import { Switch, Route } from 'react-router-dom';
|
|
||||||
import { bindActionCreators, compose } from 'redux';
|
|
||||||
|
|
||||||
// Utils
|
|
||||||
import { pluginId } from 'app';
|
|
||||||
|
|
||||||
// Containers
|
|
||||||
import HomePage from 'containers/HomePage';
|
|
||||||
import NotFoundPage from 'containers/NotFoundPage';
|
|
||||||
|
|
||||||
class App extends React.Component {
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div className={pluginId}>
|
|
||||||
<Switch>
|
|
||||||
<Route path={`/plugins/${pluginId}`} component={HomePage} exact />
|
|
||||||
<Route component={NotFoundPage} />
|
|
||||||
</Switch>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
App.contextTypes = {
|
|
||||||
plugins: PropTypes.object,
|
|
||||||
router: PropTypes.object.isRequired,
|
|
||||||
updatePlugin: PropTypes.func,
|
|
||||||
};
|
|
||||||
|
|
||||||
App.propTypes = {};
|
|
||||||
|
|
||||||
export function mapDispatchToProps(dispatch) {
|
|
||||||
return bindActionCreators(
|
|
||||||
{},
|
|
||||||
dispatch,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({});
|
|
||||||
|
|
||||||
// Wrap the component to inject dispatch and state into it
|
|
||||||
const withConnect = connect(mapStateToProps, mapDispatchToProps);
|
|
||||||
|
|
||||||
export default compose(
|
|
||||||
withConnect,
|
|
||||||
)(App);
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* App reducer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { fromJS } from 'immutable';
|
|
||||||
|
|
||||||
const initialState = fromJS({});
|
|
||||||
|
|
||||||
function appReducer(state = initialState, action) {
|
|
||||||
switch (action.type) {
|
|
||||||
default:
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default appReducer;
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
// import { createSelector } from 'reselect';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Direct selector to the list state domain
|
|
||||||
*/
|
|
||||||
|
|
||||||
// const selectGlobalDomain = () => state => state.get('global');
|
|
||||||
|
|
||||||
export {};
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* HomePage actions
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { DEFAULT_ACTION } from './constants';
|
|
||||||
|
|
||||||
export function defaultAction() {
|
|
||||||
return {
|
|
||||||
type: DEFAULT_ACTION,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* HomePage constants
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const DEFAULT_ACTION = 'HomePage/DEFAULT_ACTION';
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* HomePage
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { createStructuredSelector } from 'reselect';
|
|
||||||
import { injectIntl } from 'react-intl';
|
|
||||||
import { bindActionCreators, compose } from 'redux';
|
|
||||||
|
|
||||||
import injectReducer from 'utils/injectReducer';
|
|
||||||
import injectSaga from 'utils/injectSaga';
|
|
||||||
|
|
||||||
// Selectors
|
|
||||||
import selectHomePage from './selectors';
|
|
||||||
|
|
||||||
// Styles
|
|
||||||
import styles from './styles.scss';
|
|
||||||
|
|
||||||
import reducer from './reducer';
|
|
||||||
import saga from './saga';
|
|
||||||
|
|
||||||
export class HomePage extends React.Component {
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div className={styles.homePage}>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HomePage.contextTypes = {
|
|
||||||
router: PropTypes.object,
|
|
||||||
};
|
|
||||||
|
|
||||||
HomePage.propTypes = {
|
|
||||||
// homePage: PropTypes.object,
|
|
||||||
};
|
|
||||||
|
|
||||||
function mapDispatchToProps(dispatch) {
|
|
||||||
return bindActionCreators(
|
|
||||||
{
|
|
||||||
// Your actions here
|
|
||||||
},
|
|
||||||
dispatch,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
|
||||||
homePage: selectHomePage(),
|
|
||||||
});
|
|
||||||
|
|
||||||
const withConnect = connect(mapStateToProps, mapDispatchToProps);
|
|
||||||
|
|
||||||
const withReducer = injectReducer({ key: 'homePage', reducer });
|
|
||||||
const withSaga = injectSaga({ key: 'homePage', saga });
|
|
||||||
|
|
||||||
export default compose(
|
|
||||||
withReducer,
|
|
||||||
withSaga,
|
|
||||||
withConnect,
|
|
||||||
)(injectIntl(HomePage));
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* HomePage reducer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { fromJS } from 'immutable';
|
|
||||||
|
|
||||||
import { DEFAULT_ACTION } from './constants';
|
|
||||||
|
|
||||||
const initialState = fromJS({});
|
|
||||||
|
|
||||||
function homePageReducer(state = initialState, action) {
|
|
||||||
switch (action.type) {
|
|
||||||
case DEFAULT_ACTION:
|
|
||||||
return state;
|
|
||||||
default:
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default homePageReducer;
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
// import { LOCATION_CHANGE } from 'react-router-redux';
|
|
||||||
// import { takeLatest, put, fork, take, cancel } from 'redux-saga/effects';
|
|
||||||
|
|
||||||
// Individual exports for testing
|
|
||||||
export function* defaultSaga() {
|
|
||||||
}
|
|
||||||
|
|
||||||
// All sagas to be loaded
|
|
||||||
export default defaultSaga;
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
import { createSelector } from 'reselect';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Direct selector to the homePage state domain
|
|
||||||
*/
|
|
||||||
const selectHomePageDomain = () => state => state.get('homePage');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Default selector used by HomePage
|
|
||||||
*/
|
|
||||||
|
|
||||||
const selectHomePage = () => createSelector(
|
|
||||||
selectHomePageDomain(),
|
|
||||||
(substate) => substate.toJS(),
|
|
||||||
);
|
|
||||||
|
|
||||||
export default selectHomePage;
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
.homePage {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
/**
|
|
||||||
* NotFoundPage
|
|
||||||
*
|
|
||||||
* This is the page we show when the user visits a url that doesn't have a route
|
|
||||||
*
|
|
||||||
* NOTE: while this component should technically be a stateless functional
|
|
||||||
* component (SFC), hot reloading does not currently support SFCs. If hot
|
|
||||||
* reloading is not a neccessity for you then you can refactor it and remove
|
|
||||||
* the linting exception.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
import NotFound from 'components/NotFound';
|
|
||||||
|
|
||||||
export default class NotFoundPage extends React.Component {
|
|
||||||
render() {
|
|
||||||
return <NotFound {...this.props} />;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user