From ea8c67899178645da1c2df03149fe32011e9d148 Mon Sep 17 00:00:00 2001 From: Hugo <hnouts.dev@gmail.com> Date: Fri, 9 Apr 2021 11:02:59 +0200 Subject: [PATCH] Us 406 + fix typo --- src/components/Action/ActionDone.tsx | 4 +- src/components/Analysis/AnalysisView.spec.tsx | 12 +++--- src/components/Analysis/AnalysisView.tsx | 4 +- .../Connection/ConnectionFormOAuth.tsx | 4 +- src/components/Duel/DuelOngoing.tsx | 4 +- .../Exploration/ExplorationFinished.tsx | 4 +- src/components/FAQ/FAQContent.tsx | 2 +- src/components/Hooks/useExploration.tsx | 4 +- .../Konnector/KonnectorViewerCard.tsx | 6 +-- src/components/Options/ProfileTypeOptions.tsx | 2 +- src/components/Splash/SplashRoot.tsx | 16 ++++---- src/locales/fr.json | 12 +++--- src/store/global/global.action.spec.ts | 40 +++++++++---------- src/store/global/global.actions.ts | 38 +++++++++--------- src/store/global/global.reducer.spec.ts | 40 +++++++++---------- src/store/global/global.reducer.ts | 16 ++++---- 16 files changed, 104 insertions(+), 104 deletions(-) diff --git a/src/components/Action/ActionDone.tsx b/src/components/Action/ActionDone.tsx index 749803180..18f84913b 100644 --- a/src/components/Action/ActionDone.tsx +++ b/src/components/Action/ActionDone.tsx @@ -11,7 +11,7 @@ import { useHistory } from 'react-router-dom' import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import starFilled from 'assets/icons/visu/challenge/starFilled.svg' import './actionDone.scss' -import { toogleChallengeActionNotification } from 'store/global/global.actions' +import { toggleChallengeActionNotification } from 'store/global/global.actions' interface ActionDoneProps { currentChallenge: UserChallenge } @@ -29,7 +29,7 @@ const ActionDone: React.FC<ActionDoneProps> = ({ currentChallenge, UserChallengeUpdateFlag.ACTION_DONE ) - dispatch(toogleChallengeActionNotification(false)) + dispatch(toggleChallengeActionNotification(false)) dispatch(updateUserChallengeList(updatedChallenge)) history.goBack() }, [currentChallenge, dispatch, client, history]) diff --git a/src/components/Analysis/AnalysisView.spec.tsx b/src/components/Analysis/AnalysisView.spec.tsx index 4fee1caf0..c9ae69479 100644 --- a/src/components/Analysis/AnalysisView.spec.tsx +++ b/src/components/Analysis/AnalysisView.spec.tsx @@ -30,9 +30,9 @@ jest.mock('components/Analysis/MonthlyAnalysis', () => () => ( const useSelectorSpy = jest.spyOn(reactRedux, 'useSelector') const useDispatchSpy = jest.spyOn(reactRedux, 'useDispatch') -const toogleAnalysisNotificationSpy = jest.spyOn( +const toggleAnalysisNotificationSpy = jest.spyOn( globalActions, - 'toogleAnalysisNotification' + 'toggleAnalysisNotification' ) const updateProfileSpy = jest.spyOn(profileActions, 'updateProfile') @@ -43,7 +43,7 @@ describe('AnalysisView component', () => { store = createMockStore(mockInitialEcolyoState) useSelectorSpy.mockClear() useDispatchSpy.mockClear() - toogleAnalysisNotificationSpy.mockClear() + toggleAnalysisNotificationSpy.mockClear() updateProfileSpy.mockClear() }) @@ -63,7 +63,7 @@ describe('AnalysisView component', () => { expect(wrapper.find('#monthlyanalysis')).toBeTruthy() }) - it('should update profile and toogle analysis notification to false if notification is true', () => { + it('should update profile and toggle analysis notification to false if notification is true', () => { useSelectorSpy.mockReturnValue({ global: { ...globalStateData, @@ -87,7 +87,7 @@ describe('AnalysisView component', () => { expect(updateProfileSpy).toHaveBeenCalledWith({ haveSeenLastAnalysis: true, }) - expect(toogleAnalysisNotificationSpy).toBeCalledTimes(1) - expect(toogleAnalysisNotificationSpy).toHaveBeenCalledWith(false) + expect(toggleAnalysisNotificationSpy).toBeCalledTimes(1) + expect(toggleAnalysisNotificationSpy).toHaveBeenCalledWith(false) }) }) diff --git a/src/components/Analysis/AnalysisView.tsx b/src/components/Analysis/AnalysisView.tsx index 63d2a75ca..b6e551077 100644 --- a/src/components/Analysis/AnalysisView.tsx +++ b/src/components/Analysis/AnalysisView.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useCallback } from 'react' import { useSelector, useDispatch } from 'react-redux' import { updateProfile } from 'store/profile/profile.actions' -import { toogleAnalysisNotification } from 'store/global/global.actions' +import { toggleAnalysisNotification } from 'store/global/global.actions' import { AppStore } from 'store' import CozyBar from 'components/Header/CozyBar' @@ -27,7 +27,7 @@ const AnalysisView: React.FC = () => { const updateAnalysisNotification = () => { if (analysisNotification) { dispatch(updateProfile({ haveSeenLastAnalysis: true })) - dispatch(toogleAnalysisNotification(false)) + dispatch(toggleAnalysisNotification(false)) } } diff --git a/src/components/Connection/ConnectionFormOAuth.tsx b/src/components/Connection/ConnectionFormOAuth.tsx index 84ccbd630..86a2a41c3 100644 --- a/src/components/Connection/ConnectionFormOAuth.tsx +++ b/src/components/Connection/ConnectionFormOAuth.tsx @@ -86,7 +86,7 @@ const ConnectionFormOAuth: React.FC<ConnectionFormOAuthProps> = ({ {t('auth.' + konnectorSlug + '.no_account.text')} </div> </div> - <div className="koauthform-button"> + {/* <div className="koauthform-button"> <Button aria-label={t('auth.accessibility.button_create_account')} onClick={() => window.open(siteLink, '_blank')} @@ -97,7 +97,7 @@ const ConnectionFormOAuth: React.FC<ConnectionFormOAuthProps> = ({ > {t('auth.' + konnectorSlug + '.create_account')} </Button> - </div> + </div> */} </div> ) } diff --git a/src/components/Duel/DuelOngoing.tsx b/src/components/Duel/DuelOngoing.tsx index ef3a1cb14..0eaf5926b 100644 --- a/src/components/Duel/DuelOngoing.tsx +++ b/src/components/Duel/DuelOngoing.tsx @@ -9,7 +9,7 @@ import { unlockNextUserChallenge, updateUserChallengeList, } from 'store/challenge/challenge.actions' -import { toogleChallengeDuelNotification } from 'store/global/global.actions' +import { toggleChallengeDuelNotification } from 'store/global/global.actions' import { formatNumberValues } from 'utils/utils' import { UserDuel, UserChallenge } from 'models' @@ -63,7 +63,7 @@ const DuelOngoing: React.FC<DuelOngoingProps> = ({ ) dispatch(updateUserChallengeList(updatedChallenge)) dispatch(unlockNextUserChallenge(updatedChallenge)) - dispatch(toogleChallengeDuelNotification(false)) + dispatch(toggleChallengeDuelNotification(false)) history.push('/challenges') }, [client, dispatch, userChallenge, history, winChallenge]) diff --git a/src/components/Exploration/ExplorationFinished.tsx b/src/components/Exploration/ExplorationFinished.tsx index de05d0753..9ff992a39 100644 --- a/src/components/Exploration/ExplorationFinished.tsx +++ b/src/components/Exploration/ExplorationFinished.tsx @@ -12,7 +12,7 @@ import { updateUserChallengeList } from 'store/challenge/challenge.actions' import ChallengeService from 'services/challenge.service' import { Client, useClient } from 'cozy-client' import { useDispatch } from 'react-redux' -import { toogleChallengeExplorationNotification } from 'store/global/global.actions' +import { toggleChallengeExplorationNotification } from 'store/global/global.actions' interface ExplorationFinishedProps { userChallenge: UserChallenge @@ -33,7 +33,7 @@ const ExplorationFinished: React.FC<ExplorationFinishedProps> = ({ userChallenge, UserChallengeUpdateFlag.EXPLORATION_DONE ) - dispatch(toogleChallengeExplorationNotification(false)) + dispatch(toggleChallengeExplorationNotification(false)) dispatch(updateUserChallengeList(updatedChallenge)) } }, [client, dispatch, userChallenge]) diff --git a/src/components/FAQ/FAQContent.tsx b/src/components/FAQ/FAQContent.tsx index b65429a99..8dfd1d9a1 100644 --- a/src/components/FAQ/FAQContent.tsx +++ b/src/components/FAQ/FAQContent.tsx @@ -72,7 +72,7 @@ const FAQContent: React.FC = () => { }} > <ExpansionPanelSummary - aria-label={t('faq.accessibility.button_toogle_detail')} + aria-label={t('faq.accessibility.button_toggle_detail')} expandIcon={<StyledIcon icon={ChevronOffIcon} />} classes={{ root: 'expansion-panel-summary small bold-text', diff --git a/src/components/Hooks/useExploration.tsx b/src/components/Hooks/useExploration.tsx index 3b88c0762..75c99610d 100644 --- a/src/components/Hooks/useExploration.tsx +++ b/src/components/Hooks/useExploration.tsx @@ -7,7 +7,7 @@ import { AppStore } from 'store' import ExplorationService from 'services/exploration.service' import { updateUserChallengeList } from 'store/challenge/challenge.actions' import { UserExplorationState } from 'enum/userExploration.enum' -import { toogleChallengeExplorationNotification } from 'store/global/global.actions' +import { toggleChallengeExplorationNotification } from 'store/global/global.actions' const useExploration = (): [string, Dispatch<SetStateAction<string>>] => { const client: Client = useClient() @@ -41,7 +41,7 @@ const useExploration = (): [string, Dispatch<SetStateAction<string>>] => { updatedChallenge.exploration.state === UserExplorationState.NOTIFICATION ) { - dispatch(toogleChallengeExplorationNotification(true)) + dispatch(toggleChallengeExplorationNotification(true)) } }) if (subscribed) setExplorationID('') diff --git a/src/components/Konnector/KonnectorViewerCard.tsx b/src/components/Konnector/KonnectorViewerCard.tsx index 25cc8c6ee..0ff83d4bb 100644 --- a/src/components/Konnector/KonnectorViewerCard.tsx +++ b/src/components/Konnector/KonnectorViewerCard.tsx @@ -21,7 +21,7 @@ import { updateProfile } from 'store/profile/profile.actions' import { setChallengeConsumption } from 'store/challenge/challenge.actions' import { setFluidStatus, - toogleChallengeDuelNotification, + toggleChallengeDuelNotification, updatedFluidConnection, } from 'store/global/global.actions' import FluidService from 'services/fluid.service' @@ -131,7 +131,7 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ updatedUserChallenge, dataloads ) - dispatch(toogleChallengeDuelNotification(isDone)) + dispatch(toggleChallengeDuelNotification(isDone)) } }, [client, dispatch, currentChallenge]) @@ -257,7 +257,7 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ > <ExpansionPanelSummary aria-label={t( - `konnector_options.accessibility.button_toogle_detail_${FluidType[ + `konnector_options.accessibility.button_toggle_detail_${FluidType[ fluidStatus.fluidType ].toLowerCase()}` )} diff --git a/src/components/Options/ProfileTypeOptions.tsx b/src/components/Options/ProfileTypeOptions.tsx index 0e9c1f13c..742ab706e 100644 --- a/src/components/Options/ProfileTypeOptions.tsx +++ b/src/components/Options/ProfileTypeOptions.tsx @@ -58,7 +58,7 @@ const ProfileTypeOptions: React.FC = () => { > <ExpansionPanelSummary aria-label={t( - 'profile_type.accessibility.button_toogle_detail_profile' + 'profile_type.accessibility.button_toggle_detail_profile' )} expandIcon={<Icon icon={chevronDown} size={16} />} classes={{ diff --git a/src/components/Splash/SplashRoot.tsx b/src/components/Splash/SplashRoot.tsx index 350e8b85f..3f8cea74a 100644 --- a/src/components/Splash/SplashRoot.tsx +++ b/src/components/Splash/SplashRoot.tsx @@ -3,10 +3,10 @@ import { useClient } from 'cozy-client' import classNames from 'classnames' import { useDispatch } from 'react-redux' import { - toogleAnalysisNotification, - toogleChallengeExplorationNotification, - toogleChallengeActionNotification, - toogleChallengeDuelNotification, + toggleAnalysisNotification, + toggleChallengeExplorationNotification, + toggleChallengeActionNotification, + toggleChallengeDuelNotification, setFluidStatus, } from 'store/global/global.actions' import { updateProfile } from 'store/profile/profile.actions' @@ -129,7 +129,7 @@ const SplashRoot = ({ profile = resultAnalysis.profile } dispatch(updateProfile(profile)) - dispatch(toogleAnalysisNotification(!profile.haveSeenLastAnalysis)) + dispatch(toggleAnalysisNotification(!profile.haveSeenLastAnalysis)) } // Init Fluid status && lastDate for the chart const fluidStatus = await initializationService.initFluidStatus() @@ -161,7 +161,7 @@ const SplashRoot = ({ filteredCurrentOngoingChallenge[0].exploration.state === UserExplorationState.NOTIFICATION ) { - dispatch(toogleChallengeExplorationNotification(true)) + dispatch(toggleChallengeExplorationNotification(true)) } // Set Notification if action state is notification if ( @@ -175,7 +175,7 @@ const SplashRoot = ({ ) if (updatedUserChallenge) { dispatch(updateUserChallengeList(updatedUserChallenge)) - dispatch(toogleChallengeActionNotification(true)) + dispatch(toggleChallengeActionNotification(true)) } } const filteredCurrentDuelChallenge = userChallengeList.filter( @@ -199,7 +199,7 @@ const SplashRoot = ({ updatedUserChallenge, dataloads ) - dispatch(toogleChallengeDuelNotification(isDone)) + dispatch(toggleChallengeDuelNotification(isDone)) } } } diff --git a/src/locales/fr.json b/src/locales/fr.json index 25a26f896..f787dee09 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -124,7 +124,7 @@ }, "no_account": { "title": "Pas de compte GRDF ?", - "text": "Vous pouvez le créer en vous munissant d'une facture de gaz." + "text": "Pas de panique, vous pouvez le créer facilement en cliquant également sur le bouton jaune ci-dessus. N'oubliez pas de vous munir d'une facture de gaz." }, "create_account": "Je crée mon compte GRDF", "authModal": { @@ -342,7 +342,7 @@ "title_faq": "Foire aux questions", "read_faq": "Lire la FAQ", "accessibility": { - "button_toogle_detail": "Afficher ou masquer le détail de la question" + "button_toggle_detail": "Afficher ou masquer le détail de la question" } }, "feedback": { @@ -399,9 +399,9 @@ "label_connect_to_water": "Se connecter à l'eau", "label_connect_to_gas": "Se connecter au gaz", "accessibility": { - "button_toogle_detail_electricity": "Afficher ou masquer le détail de la connexion a l'électricité", - "button_toogle_detail_water": "Afficher ou masquer le détail de la connexion à l'eau", - "button_toogle_detail_gas": "Afficher ou masquer le détail de la connexion au gaz" + "button_toggle_detail_electricity": "Afficher ou masquer le détail de la connexion a l'électricité", + "button_toggle_detail_water": "Afficher ou masquer le détail de la connexion à l'eau", + "button_toggle_detail_gas": "Afficher ou masquer le détail de la connexion au gaz" } }, "konnector_modal": { @@ -640,7 +640,7 @@ "button_next": "Aller à la section suivante", "button_previous": "Retour à la section précédente", "button_update_profile": "Ouvrir la page de mise à jour du profil", - "button_toogle_detail_profile": "Afficher ou masquer le détail du profil", + "button_toggle_detail_profile": "Afficher ou masquer le détail du profil", "button_validate": "Valider" } }, diff --git a/src/store/global/global.action.spec.ts b/src/store/global/global.action.spec.ts index b37452759..1695a6e0c 100644 --- a/src/store/global/global.action.spec.ts +++ b/src/store/global/global.action.spec.ts @@ -2,16 +2,16 @@ import { ScreenType } from 'enum/screen.enum' import { mockInitialGlobalState } from '../../../tests/__mocks__/store' import { CHANGE_SCREEN_TYPE, - TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, - TOOGLE_CHALLENGE_ACTION_NOTIFICATION, - TOOGLE_CHALLENGE_DUEL_NOTIFICATION, - TOOGLE_ANALYSIS_NOTIFICATION, + TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + TOGGLE_CHALLENGE_ACTION_NOTIFICATION, + TOGGLE_CHALLENGE_DUEL_NOTIFICATION, + TOGGLE_ANALYSIS_NOTIFICATION, SET_FLUID_STATUS, changeScreenType, - toogleChallengeExplorationNotification, - toogleChallengeActionNotification, - toogleChallengeDuelNotification, - toogleAnalysisNotification, + toggleChallengeExplorationNotification, + toggleChallengeActionNotification, + toggleChallengeDuelNotification, + toggleAnalysisNotification, setFluidStatus, } from './global.actions' @@ -25,46 +25,46 @@ describe('global actions', () => { expect(changeScreenType(screenType)).toEqual(expectedAction) }) - it('should create an action to toogle challenge exploration notification', () => { + it('should create an action to toggle challenge exploration notification', () => { const notification = true const expectedAction = { - type: TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + type: TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, payload: notification, } - expect(toogleChallengeExplorationNotification(notification)).toEqual( + expect(toggleChallengeExplorationNotification(notification)).toEqual( expectedAction ) }) - it('should create an action to toogle challenge action notification', () => { + it('should create an action to toggle challenge action notification', () => { const notification = true const expectedAction = { - type: TOOGLE_CHALLENGE_ACTION_NOTIFICATION, + type: TOGGLE_CHALLENGE_ACTION_NOTIFICATION, payload: notification, } - expect(toogleChallengeActionNotification(notification)).toEqual( + expect(toggleChallengeActionNotification(notification)).toEqual( expectedAction ) }) - it('should create an action to toogle challenge duel notification', () => { + it('should create an action to toggle challenge duel notification', () => { const notification = true const expectedAction = { - type: TOOGLE_CHALLENGE_DUEL_NOTIFICATION, + type: TOGGLE_CHALLENGE_DUEL_NOTIFICATION, payload: notification, } - expect(toogleChallengeDuelNotification(notification)).toEqual( + expect(toggleChallengeDuelNotification(notification)).toEqual( expectedAction ) }) - it('should create an action to toogle analysis notification', () => { + it('should create an action to toggle analysis notification', () => { const notification = true const expectedAction = { - type: TOOGLE_ANALYSIS_NOTIFICATION, + type: TOGGLE_ANALYSIS_NOTIFICATION, payload: notification, } - expect(toogleAnalysisNotification(notification)).toEqual(expectedAction) + expect(toggleAnalysisNotification(notification)).toEqual(expectedAction) }) it('should create an action to set fluid status', () => { diff --git a/src/store/global/global.actions.ts b/src/store/global/global.actions.ts index 2e3d82c40..b32740abf 100644 --- a/src/store/global/global.actions.ts +++ b/src/store/global/global.actions.ts @@ -3,13 +3,13 @@ import { ScreenType } from 'enum/screen.enum' import { FluidConnection, FluidStatus } from 'models' export const CHANGE_SCREEN_TYPE = 'CHANGE_SCREEN_TYPE' -export const TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION = - 'TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION' -export const TOOGLE_CHALLENGE_ACTION_NOTIFICATION = - 'TOOGLE_CHALLENGE_ACTION_NOTIFICATION' -export const TOOGLE_CHALLENGE_DUEL_NOTIFICATION = - 'TOOGLE_CHALLENGE_DUEL_NOTIFICATION' -export const TOOGLE_ANALYSIS_NOTIFICATION = 'TOOGLE_ANALYSIS_NOTIFICATION' +export const TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION = + 'TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION' +export const TOGGLE_CHALLENGE_ACTION_NOTIFICATION = + 'TOGGLE_CHALLENGE_ACTION_NOTIFICATION' +export const TOGGLE_CHALLENGE_DUEL_NOTIFICATION = + 'TOGGLE_CHALLENGE_DUEL_NOTIFICATION' +export const TOGGLE_ANALYSIS_NOTIFICATION = 'TOGGLE_ANALYSIS_NOTIFICATION' export const SET_FLUID_STATUS = 'SET_FLUID_STATUS' export const UPDATE_FLUID_CONNECTION = 'UPDATE_FLUID_CONNECTION' @@ -19,22 +19,22 @@ interface ChangeScreenType { } interface ToogleChallengeExplorationNotification { - type: typeof TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION + type: typeof TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION payload?: boolean } interface ToogleChallengeActionNotification { - type: typeof TOOGLE_CHALLENGE_ACTION_NOTIFICATION + type: typeof TOGGLE_CHALLENGE_ACTION_NOTIFICATION payload?: boolean } interface ToogleChallengeDuelNotification { - type: typeof TOOGLE_CHALLENGE_DUEL_NOTIFICATION + type: typeof TOGGLE_CHALLENGE_DUEL_NOTIFICATION payload?: boolean } interface ToogleAnalysisNotification { - type: typeof TOOGLE_ANALYSIS_NOTIFICATION + type: typeof TOGGLE_ANALYSIS_NOTIFICATION payload?: boolean } @@ -64,36 +64,36 @@ export function changeScreenType(screenType: ScreenType): GlobalActionTypes { } } -export function toogleChallengeExplorationNotification( +export function toggleChallengeExplorationNotification( notif: boolean ): GlobalActionTypes { return { - type: TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + type: TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, payload: notif, } } -export function toogleChallengeActionNotification( +export function toggleChallengeActionNotification( notif: boolean ): GlobalActionTypes { return { - type: TOOGLE_CHALLENGE_ACTION_NOTIFICATION, + type: TOGGLE_CHALLENGE_ACTION_NOTIFICATION, payload: notif, } } -export function toogleChallengeDuelNotification( +export function toggleChallengeDuelNotification( notif: boolean ): GlobalActionTypes { return { - type: TOOGLE_CHALLENGE_DUEL_NOTIFICATION, + type: TOGGLE_CHALLENGE_DUEL_NOTIFICATION, payload: notif, } } -export function toogleAnalysisNotification(notif: boolean): GlobalActionTypes { +export function toggleAnalysisNotification(notif: boolean): GlobalActionTypes { return { - type: TOOGLE_ANALYSIS_NOTIFICATION, + type: TOGGLE_ANALYSIS_NOTIFICATION, payload: notif, } } diff --git a/src/store/global/global.reducer.spec.ts b/src/store/global/global.reducer.spec.ts index 40a9bfb06..6e4eb48be 100644 --- a/src/store/global/global.reducer.spec.ts +++ b/src/store/global/global.reducer.spec.ts @@ -1,10 +1,10 @@ import { globalReducer } from './global.reducer' import { CHANGE_SCREEN_TYPE, - TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, - TOOGLE_CHALLENGE_ACTION_NOTIFICATION, - TOOGLE_CHALLENGE_DUEL_NOTIFICATION, - TOOGLE_ANALYSIS_NOTIFICATION, + TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + TOGGLE_CHALLENGE_ACTION_NOTIFICATION, + TOGGLE_CHALLENGE_DUEL_NOTIFICATION, + TOGGLE_ANALYSIS_NOTIFICATION, SET_FLUID_STATUS, } from './global.actions' import { ScreenType } from 'enum/screen.enum' @@ -53,9 +53,9 @@ describe('global reducer', () => { expect(result).toEqual(mockInitialGlobalState) }) - it('should handle TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION with payload', () => { + it('should handle TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION with payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + type: TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, payload: true, }) expect(result).toEqual({ @@ -64,16 +64,16 @@ describe('global reducer', () => { }) }) - it('should handle TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION without payload', () => { + it('should handle TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION without payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + type: TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, }) expect(result).toEqual(mockInitialGlobalState) }) - it('should handle TOOGLE_CHALLENGE_ACTION_NOTIFICATION with payload', () => { + it('should handle TOGGLE_CHALLENGE_ACTION_NOTIFICATION with payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_ACTION_NOTIFICATION, + type: TOGGLE_CHALLENGE_ACTION_NOTIFICATION, payload: true, }) expect(result).toEqual({ @@ -82,16 +82,16 @@ describe('global reducer', () => { }) }) - it('should handle TOOGLE_CHALLENGE_ACTION_NOTIFICATION without payload', () => { + it('should handle TOGGLE_CHALLENGE_ACTION_NOTIFICATION without payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_ACTION_NOTIFICATION, + type: TOGGLE_CHALLENGE_ACTION_NOTIFICATION, }) expect(result).toEqual(mockInitialGlobalState) }) - it('should handle TOOGLE_CHALLENGE_DUEL_NOTIFICATION with payload', () => { + it('should handle TOGGLE_CHALLENGE_DUEL_NOTIFICATION with payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_DUEL_NOTIFICATION, + type: TOGGLE_CHALLENGE_DUEL_NOTIFICATION, payload: true, }) expect(result).toEqual({ @@ -100,16 +100,16 @@ describe('global reducer', () => { }) }) - it('should handle TOOGLE_CHALLENGE_DUEL_NOTIFICATION without payload', () => { + it('should handle TOGGLE_CHALLENGE_DUEL_NOTIFICATION without payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_DUEL_NOTIFICATION, + type: TOGGLE_CHALLENGE_DUEL_NOTIFICATION, }) expect(result).toEqual(mockInitialGlobalState) }) - it('should handle TOOGLE_ANALYSIS_NOTIFICATION with payload', () => { + it('should handle TOGGLE_ANALYSIS_NOTIFICATION with payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_ANALYSIS_NOTIFICATION, + type: TOGGLE_ANALYSIS_NOTIFICATION, payload: true, }) expect(result).toEqual({ @@ -118,9 +118,9 @@ describe('global reducer', () => { }) }) - it('should handle TOOGLE_ANALYSIS_NOTIFICATION without payload', () => { + it('should handle TOGGLE_ANALYSIS_NOTIFICATION without payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_ANALYSIS_NOTIFICATION, + type: TOGGLE_ANALYSIS_NOTIFICATION, }) expect(result).toEqual(mockInitialGlobalState) }) diff --git a/src/store/global/global.reducer.ts b/src/store/global/global.reducer.ts index ce4c3f740..3cd6ec45e 100644 --- a/src/store/global/global.reducer.ts +++ b/src/store/global/global.reducer.ts @@ -1,10 +1,10 @@ import { Reducer } from 'redux' import { CHANGE_SCREEN_TYPE, - TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, - TOOGLE_CHALLENGE_ACTION_NOTIFICATION, - TOOGLE_CHALLENGE_DUEL_NOTIFICATION, - TOOGLE_ANALYSIS_NOTIFICATION, + TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + TOGGLE_CHALLENGE_ACTION_NOTIFICATION, + TOGGLE_CHALLENGE_DUEL_NOTIFICATION, + TOGGLE_ANALYSIS_NOTIFICATION, SET_FLUID_STATUS, GlobalActionTypes, UPDATE_FLUID_CONNECTION, @@ -109,28 +109,28 @@ export const globalReducer: Reducer<GlobalState> = ( screenType: action.payload, } : state - case TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION: + case TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION: return action.payload != undefined ? { ...state, challengeExplorationNotification: action.payload, } : state - case TOOGLE_CHALLENGE_ACTION_NOTIFICATION: + case TOGGLE_CHALLENGE_ACTION_NOTIFICATION: return action.payload != undefined ? { ...state, challengeActionNotification: action.payload, } : state - case TOOGLE_CHALLENGE_DUEL_NOTIFICATION: + case TOGGLE_CHALLENGE_DUEL_NOTIFICATION: return action.payload != undefined ? { ...state, challengeDuelNotification: action.payload, } : state - case TOOGLE_ANALYSIS_NOTIFICATION: + case TOGGLE_ANALYSIS_NOTIFICATION: return action.payload != undefined ? { ...state, -- GitLab