@@ -16,7 +16,6 @@ import {
1616 Mode ,
1717 Notification ,
1818 Orientation ,
19- Page ,
2019 PairCharacters ,
2120 PrimaryAction ,
2221 PrimaryActionAuto ,
@@ -33,6 +32,7 @@ import { performCompileToHirOnly } from './reducers/output/hir';
3332import { performCompileToLlvmIrOnly } from './reducers/output/llvmIr' ;
3433import { performCompileToMirOnly } from './reducers/output/mir' ;
3534import { performCompileToWasmOnly } from './reducers/output/wasm' ;
35+ import { navigateToHelp , navigateToIndex } from './reducers/page' ;
3636
3737export type ThunkAction < T = void > = ReduxThunkAction < T , State , { } , Action > ;
3838export type SimpleThunkAction < T = void > = ReduxThunkAction < T , State , { } , AnyAction > ;
@@ -43,7 +43,6 @@ const createAction = <T extends string, P extends {}>(type: T, props?: P) => (
4343
4444export enum ActionType {
4545 InitializeApplication = 'INITIALIZE_APPLICATION' ,
46- SetPage = 'SET_PAGE' ,
4746 ChangeEditor = 'CHANGE_EDITOR' ,
4847 ChangeKeybinding = 'CHANGE_KEYBINDING' ,
4948 ChangeAceTheme = 'CHANGE_ACE_THEME' ,
@@ -71,12 +70,6 @@ export enum ActionType {
7170
7271export const initializeApplication = ( ) => createAction ( ActionType . InitializeApplication ) ;
7372
74- const setPage = ( page : Page ) =>
75- createAction ( ActionType . SetPage , { page } ) ;
76-
77- export const navigateToIndex = ( ) => setPage ( 'index' ) ;
78- export const navigateToHelp = ( ) => setPage ( 'help' ) ;
79-
8073export const changeEditor = ( editor : Editor ) =>
8174 createAction ( ActionType . ChangeEditor , { editor } ) ;
8275
@@ -310,9 +303,7 @@ export function indexPageLoad({
310303 } ;
311304}
312305
313- export function helpPageLoad ( ) {
314- return navigateToHelp ( ) ;
315- }
306+ export const helpPageLoad = navigateToHelp ;
316307
317308export function showExample ( code : string ) : ThunkAction {
318309 return function ( dispatch ) {
@@ -323,7 +314,6 @@ export function showExample(code: string): ThunkAction {
323314
324315export type Action =
325316 | ReturnType < typeof initializeApplication >
326- | ReturnType < typeof setPage >
327317 | ReturnType < typeof changePairCharacters >
328318 | ReturnType < typeof changeAssemblyFlavor >
329319 | ReturnType < typeof changeBacktrace >
@@ -347,5 +337,6 @@ export type Action =
347337 | ReturnType < typeof selectText >
348338 | ReturnType < typeof notificationSeen >
349339 | ReturnType < typeof browserWidthChanged >
340+ | ReturnType < typeof navigateToIndex >
350341 | ReturnType < typeof wsExecuteRequest >
351342 ;
0 commit comments