Skip to content

Commit

Permalink
fix: Use current locale for the banners (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio authored Jan 27, 2025
1 parent a3a9b2e commit 1521cc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/containers/Banner/Banner.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { connect } from 'react-redux'
import {
getBanner,
getBannerAssets,
getContentfulNormalizedLocale,
getError,
isLoading
} from '../../modules/campaign'
Expand All @@ -12,7 +13,8 @@ const mapState = (state: any, ownProps: OwnProps): MapStateProps => ({
fields: getBanner(state, ownProps.id) ?? null,
assets: getBannerAssets(state, ownProps.id),
isLoading: isLoading(state),
error: getError(state)
error: getError(state),
locale: getContentfulNormalizedLocale(state)
})

export default connect<MapStateProps, {}, OwnProps>(mapState)(Banner)
2 changes: 1 addition & 1 deletion src/containers/Banner/Banner.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export type BannerProps = Omit<UIBannerProps, 'fields'> & {
export type OwnProps = Pick<BannerProps, 'id'>
export type MapStateProps = Pick<
BannerProps,
'fields' | 'assets' | 'isLoading' | 'error'
'fields' | 'assets' | 'isLoading' | 'error' | 'locale'
>

0 comments on commit 1521cc4

Please sign in to comment.