Skip to content

Commit 0d54677

Browse files
Merge pull request #41 from devgateway/wp-react-lib-ts
2 parents c539632 + 7ce74cb commit 0d54677

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devgateway/wp-react-lib": patch
3+
---
4+
5+
Fix localized provider by fixing the destructured props

wp-react-lib/src/providers/LocalizedProvider.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {AppContext} from "./Context"
33

44
const LocalizedProvider = (CustomProvider) => (props) => (
55
<AppContext.Consumer>
6-
{({locale}) => <CustomProvider locale={locale} {...props} />}
6+
{(data) => <CustomProvider locale={data?.locale} {...props} />}
77
</AppContext.Consumer>)
88

99
export default LocalizedProvider

0 commit comments

Comments
 (0)