rename reducer files to remove redundant state prefix
This commit is contained in:
parent
1e15578aec
commit
298c153f88
16 changed files with 31 additions and 31 deletions
|
@ -9,8 +9,8 @@ import Epochs from './components/Epochs';
|
|||
import Options from './components/Options';
|
||||
import Output from './components/Output';
|
||||
|
||||
import {stateReducer} from './reducers/stateReducer';
|
||||
import {initState} from './reducers/stateReducer.init';
|
||||
import {stateReducer} from './reducers/reducer';
|
||||
import {initState} from './reducers/reducer.init';
|
||||
|
||||
const PhonoChangeApplier = () => {
|
||||
const [ state, dispatch ] = useReducer(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import React, {useState} from 'react';
|
||||
import './Features.scss';
|
||||
|
||||
import type { featureAction } from '../reducers/stateReducer.features';
|
||||
import type { featureAction } from '../reducers/reducer.features';
|
||||
|
||||
const parsePhonesFromFeatureObject = featureObject => {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// @flow
|
||||
import type { stateType } from './stateReducer';
|
||||
import type { stateType } from './reducer';
|
||||
|
||||
export type epochAction = {
|
||||
type: "ADD_EPOCH" | "SET_EPOCH" | "REMOVE_EPOCH",
|
|
@ -1,4 +1,4 @@
|
|||
import {stateReducer} from './stateReducer';
|
||||
import {stateReducer} from './reducer';
|
||||
|
||||
describe('Epochs', () => {
|
||||
const state = {};
|
|
@ -1,5 +1,5 @@
|
|||
// @flow
|
||||
import type { stateType } from './stateReducer';
|
||||
import type { stateType } from './reducer';
|
||||
|
||||
export type featureAction = {
|
||||
type: "ADD_FEATURE",
|
|
@ -1,4 +1,4 @@
|
|||
import {stateReducer} from './stateReducer';
|
||||
import {stateReducer} from './reducer';
|
||||
|
||||
describe('Features', () => {
|
||||
const state = {}
|
|
@ -1,5 +1,5 @@
|
|||
// @flow
|
||||
import type { stateType } from './stateReducer';
|
||||
import type { stateType } from './reducer';
|
||||
|
||||
export type initAction = {
|
||||
type: "INIT"
|
|
@ -1,16 +1,16 @@
|
|||
// @flow
|
||||
import { addLexeme, setLexicon } from './stateReducer.lexicon';
|
||||
import type { lexiconAction } from './stateReducer.lexicon';
|
||||
import { addEpoch, setEpoch, removeEpoch } from './stateReducer.epochs';
|
||||
import type { epochAction } from './stateReducer.epochs';
|
||||
import { addFeature } from './stateReducer.features';
|
||||
import type { featureAction } from './stateReducer.features';
|
||||
import type { optionsAction } from './stateReducer.options';
|
||||
import { setOptions } from './stateReducer.options';
|
||||
import { run } from './stateReducer.results';
|
||||
import type { resultsAction } from './stateReducer.results'
|
||||
import { initState } from './stateReducer.init';
|
||||
import type { initAction } from './stateReducer.init';
|
||||
import { addLexeme, setLexicon } from './reducer.lexicon';
|
||||
import type { lexiconAction } from './reducer.lexicon';
|
||||
import { addEpoch, setEpoch, removeEpoch } from './reducer.epochs';
|
||||
import type { epochAction } from './reducer.epochs';
|
||||
import { addFeature } from './reducer.features';
|
||||
import type { featureAction } from './reducer.features';
|
||||
import type { optionsAction } from './reducer.options';
|
||||
import { setOptions } from './reducer.options';
|
||||
import { run } from './reducer.results';
|
||||
import type { resultsAction } from './reducer.results'
|
||||
import { initState } from './reducer.init';
|
||||
import type { initAction } from './reducer.init';
|
||||
|
||||
export type stateType = {
|
||||
lexicon: Array<{lexeme: string, epoch: epochType}>,
|
|
@ -1,5 +1,5 @@
|
|||
// @flow
|
||||
import type { stateType } from './stateReducer';
|
||||
import type { stateType } from './reducer';
|
||||
|
||||
type lexemeType = {
|
||||
lexeme: string,
|
|
@ -1,4 +1,4 @@
|
|||
import {stateReducer} from './stateReducer';
|
||||
import {stateReducer} from './reducer';
|
||||
|
||||
describe('Lexicon', () => {
|
||||
const state = {
|
|
@ -1,5 +1,5 @@
|
|||
// @flow
|
||||
import type { stateType } from './stateReducer';
|
||||
import type { stateType } from './reducer';
|
||||
|
||||
export type optionAction = {
|
||||
type: 'SET_OPTIONS',
|
|
@ -1,5 +1,5 @@
|
|||
import { stateReducer } from './stateReducer';
|
||||
import { initState } from './stateReducer.init';
|
||||
import { stateReducer } from './reducer';
|
||||
import { initState } from './reducer.init';
|
||||
|
||||
describe('Options', () => {
|
||||
let state = {}
|
|
@ -1,4 +1,4 @@
|
|||
import {stateReducer} from './stateReducer';
|
||||
import {stateReducer} from './reducer';
|
||||
|
||||
describe('Phones', () => {
|
||||
const n_phone = {features: {nasal: true}, grapheme: 'n'};
|
|
@ -1,5 +1,5 @@
|
|||
// @flow
|
||||
import type { stateType, epochType, phoneType } from './stateReducer';
|
||||
import type { stateType, epochType, phoneType } from './reducer';
|
||||
|
||||
export type resultsAction = {
|
||||
type: 'RUN'
|
|
@ -1,6 +1,6 @@
|
|||
import { stateReducer } from './stateReducer';
|
||||
import { initState } from './stateReducer.init';
|
||||
import { decomposeRules } from './stateReducer.results';
|
||||
import { stateReducer } from './reducer';
|
||||
import { initState } from './reducer.init';
|
||||
import { decomposeRules } from './reducer.results';
|
||||
|
||||
describe('Results', () => {
|
||||
let state = {};
|
|
@ -1,4 +1,4 @@
|
|||
import {stateReducer} from './stateReducer';
|
||||
import {stateReducer} from './reducer';
|
||||
|
||||
it('default returns state unaltered', () => {
|
||||
const state = {data: 'example'};
|
Loading…
Reference in a new issue