rename reducer files to remove redundant state prefix

This commit is contained in:
Sorrel Bri 2020-02-13 20:20:03 -08:00
parent 1e15578aec
commit 298c153f88
16 changed files with 31 additions and 31 deletions

View file

@ -9,8 +9,8 @@ import Epochs from './components/Epochs';
import Options from './components/Options'; import Options from './components/Options';
import Output from './components/Output'; import Output from './components/Output';
import {stateReducer} from './reducers/stateReducer'; import {stateReducer} from './reducers/reducer';
import {initState} from './reducers/stateReducer.init'; import {initState} from './reducers/reducer.init';
const PhonoChangeApplier = () => { const PhonoChangeApplier = () => {
const [ state, dispatch ] = useReducer( const [ state, dispatch ] = useReducer(

View file

@ -2,7 +2,7 @@
import React, {useState} from 'react'; import React, {useState} from 'react';
import './Features.scss'; import './Features.scss';
import type { featureAction } from '../reducers/stateReducer.features'; import type { featureAction } from '../reducers/reducer.features';
const parsePhonesFromFeatureObject = featureObject => { const parsePhonesFromFeatureObject = featureObject => {

View file

@ -1,5 +1,5 @@
// @flow // @flow
import type { stateType } from './stateReducer'; import type { stateType } from './reducer';
export type epochAction = { export type epochAction = {
type: "ADD_EPOCH" | "SET_EPOCH" | "REMOVE_EPOCH", type: "ADD_EPOCH" | "SET_EPOCH" | "REMOVE_EPOCH",

View file

@ -1,4 +1,4 @@
import {stateReducer} from './stateReducer'; import {stateReducer} from './reducer';
describe('Epochs', () => { describe('Epochs', () => {
const state = {}; const state = {};

View file

@ -1,5 +1,5 @@
// @flow // @flow
import type { stateType } from './stateReducer'; import type { stateType } from './reducer';
export type featureAction = { export type featureAction = {
type: "ADD_FEATURE", type: "ADD_FEATURE",

View file

@ -1,4 +1,4 @@
import {stateReducer} from './stateReducer'; import {stateReducer} from './reducer';
describe('Features', () => { describe('Features', () => {
const state = {} const state = {}

View file

@ -1,5 +1,5 @@
// @flow // @flow
import type { stateType } from './stateReducer'; import type { stateType } from './reducer';
export type initAction = { export type initAction = {
type: "INIT" type: "INIT"

View file

@ -1,16 +1,16 @@
// @flow // @flow
import { addLexeme, setLexicon } from './stateReducer.lexicon'; import { addLexeme, setLexicon } from './reducer.lexicon';
import type { lexiconAction } from './stateReducer.lexicon'; import type { lexiconAction } from './reducer.lexicon';
import { addEpoch, setEpoch, removeEpoch } from './stateReducer.epochs'; import { addEpoch, setEpoch, removeEpoch } from './reducer.epochs';
import type { epochAction } from './stateReducer.epochs'; import type { epochAction } from './reducer.epochs';
import { addFeature } from './stateReducer.features'; import { addFeature } from './reducer.features';
import type { featureAction } from './stateReducer.features'; import type { featureAction } from './reducer.features';
import type { optionsAction } from './stateReducer.options'; import type { optionsAction } from './reducer.options';
import { setOptions } from './stateReducer.options'; import { setOptions } from './reducer.options';
import { run } from './stateReducer.results'; import { run } from './reducer.results';
import type { resultsAction } from './stateReducer.results' import type { resultsAction } from './reducer.results'
import { initState } from './stateReducer.init'; import { initState } from './reducer.init';
import type { initAction } from './stateReducer.init'; import type { initAction } from './reducer.init';
export type stateType = { export type stateType = {
lexicon: Array<{lexeme: string, epoch: epochType}>, lexicon: Array<{lexeme: string, epoch: epochType}>,

View file

@ -1,5 +1,5 @@
// @flow // @flow
import type { stateType } from './stateReducer'; import type { stateType } from './reducer';
type lexemeType = { type lexemeType = {
lexeme: string, lexeme: string,

View file

@ -1,4 +1,4 @@
import {stateReducer} from './stateReducer'; import {stateReducer} from './reducer';
describe('Lexicon', () => { describe('Lexicon', () => {
const state = { const state = {

View file

@ -1,5 +1,5 @@
// @flow // @flow
import type { stateType } from './stateReducer'; import type { stateType } from './reducer';
export type optionAction = { export type optionAction = {
type: 'SET_OPTIONS', type: 'SET_OPTIONS',

View file

@ -1,5 +1,5 @@
import { stateReducer } from './stateReducer'; import { stateReducer } from './reducer';
import { initState } from './stateReducer.init'; import { initState } from './reducer.init';
describe('Options', () => { describe('Options', () => {
let state = {} let state = {}

View file

@ -1,4 +1,4 @@
import {stateReducer} from './stateReducer'; import {stateReducer} from './reducer';
describe('Phones', () => { describe('Phones', () => {
const n_phone = {features: {nasal: true}, grapheme: 'n'}; const n_phone = {features: {nasal: true}, grapheme: 'n'};

View file

@ -1,5 +1,5 @@
// @flow // @flow
import type { stateType, epochType, phoneType } from './stateReducer'; import type { stateType, epochType, phoneType } from './reducer';
export type resultsAction = { export type resultsAction = {
type: 'RUN' type: 'RUN'

View file

@ -1,6 +1,6 @@
import { stateReducer } from './stateReducer'; import { stateReducer } from './reducer';
import { initState } from './stateReducer.init'; import { initState } from './reducer.init';
import { decomposeRules } from './stateReducer.results'; import { decomposeRules } from './reducer.results';
describe('Results', () => { describe('Results', () => {
let state = {}; let state = {};

View file

@ -1,4 +1,4 @@
import {stateReducer} from './stateReducer'; import {stateReducer} from './reducer';
it('default returns state unaltered', () => { it('default returns state unaltered', () => {
const state = {data: 'example'}; const state = {data: 'example'};