mirror of
https://github.com/elyby/emails-renderer.git
synced 2026-11-29 10:43:34 +05:30
Upgrade project structure to webpack 4.
Remove unused dependencies. Rename all .jsx files into .js.
This commit is contained in:
1 parent
1f102b71b0
commit
cb84df8f96
29 files changed
+2890
-2298
No files matched your search
@@ -1,19 +1,19 @@
|
||||
import { Component } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import App from 'App';
|
||||
|
||||
import List from './List';
|
||||
|
||||
import { DEFAULT_LANGUAGE, SUPPORTED_LANGUAGES } from 'constants';
|
||||
import { DEFAULT_LANGUAGE, SUPPORTED_LANGUAGES } from 'params';
|
||||
|
||||
const EVAILABLE_EMAILS = require.context('emails', true, /index\.js$/).keys().map((path) => path.split('/')[1]);
|
||||
const AVAILABLE_EMAILS = require.context('emails', true, /index\.js$/).keys().map((path) => path.split('/')[1]);
|
||||
|
||||
export default class DevApp extends Component {
|
||||
state = {
|
||||
locale: DEFAULT_LANGUAGE,
|
||||
type: EVAILABLE_EMAILS[0],
|
||||
type: AVAILABLE_EMAILS[0],
|
||||
fixture: 'default',
|
||||
isMinimized: false
|
||||
isMinimized: false,
|
||||
};
|
||||
|
||||
componentWillMount() {
|
||||
@@ -63,7 +63,7 @@ export default class DevApp extends Component {
|
||||
/>
|
||||
|
||||
<List label="Email"
|
||||
items={EVAILABLE_EMAILS}
|
||||
items={AVAILABLE_EMAILS}
|
||||
active={type}
|
||||
onChange={this.onTypeChange}
|
||||
/>
|
||||
@@ -1,4 +1,5 @@
|
||||
import { PropTypes } from 'react';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export default function List({label, items, active, onChange}) {
|
||||
return (
|
||||
Reference in new issue
Block a user