Skip to content

Commit

Permalink
fix: renaming payload navigated event to navigated event payload (#543)
Browse files Browse the repository at this point in the history
fix: renaming payload navigated event to navigated event payload (#543)
  • Loading branch information
anninowak authored Oct 16, 2024
1 parent 4e652a1 commit 855a16e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libs/integration-interface/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ export * from './lib/topics/permissions-rpc/v1/permissions-rpc.model'

export * from './lib/topics/events/v1/events-topic'
export * from './lib/topics/events/v1/topic-event-type'
export * from './lib/topics/events/v1/payload-navigated-event'
export * from './lib/topics/events/v1/navigated-event-payload'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type PayloadNavigatedEvent = {
export type NavigatedEventPayload = {
url: string | undefined
isFirst: boolean
history: string[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { createReducer, on } from '@ngrx/store'
import { OneCxActions } from './onecx-actions'
import { OneCxState } from './onecx-state'
import { PayloadNavigatedEvent } from '@onecx/integration-interface'
import { NavigatedEventPayload } from '@onecx/integration-interface'

export const oneCxReducer = createReducer<OneCxState>(
{},
on(
OneCxActions.navigated,
(state: OneCxState, action): OneCxState => ({
...state,
location: action.event as PayloadNavigatedEvent,
location: action.event as NavigatedEventPayload,
})
)
)
4 changes: 2 additions & 2 deletions libs/ngrx-accelerator/src/lib/store-connector/onecx-state.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PayloadNavigatedEvent } from '@onecx/integration-interface'
import { NavigatedEventPayload } from '@onecx/integration-interface'

export type LocationState = PayloadNavigatedEvent
export type LocationState = NavigatedEventPayload
export interface OneCxState {
location?: LocationState | undefined
}

0 comments on commit 855a16e

Please sign in to comment.