Skip to content

Commit 5590bca

Browse files
committed
migrrate configuration wrapper to TS
1 parent 70b1d5d commit 5590bca

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/configuration/AppErrorBoundary.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import React, { useContext } from 'react'
1+
import React from 'react'
22
import { ErrorBoundary } from 'react-error-boundary'
33
import { AiFillBug } from 'react-icons/ai'
44
import { WiRefresh } from 'react-icons/wi'
5-
import '../pages/Page.css'
65

76
export default function AppErrorBoundary({ children }) {
87
function ErrorFallback({ error, resetErrorBoundary }) {

src/features/remoteConfig/providers/ConfigurationWrapper.js renamed to src/features/remoteConfig/providers/ConfigurationWrapper.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import useAsyncError from 'src/hooks/useAsyncError'
33
import { useGetRemoteConfig } from '../api/getRemoteConfig'
44
import BeatLoader from 'react-spinners/BeatLoader'
55

6-
export const ConfigurationWrapper = (props) => {
6+
type ConfigurationWrapperProps = {
7+
children: React.ReactNode
8+
}
9+
10+
export const ConfigurationWrapper = ({ children }: ConfigurationWrapperProps) => {
711
const {
812
isLoading,
913
isError,
@@ -28,5 +32,5 @@ export const ConfigurationWrapper = (props) => {
2832
throwError('Could not fetch configuration data, Make sure you are connected to the internet')
2933
}
3034

31-
return <>{props.children}</>
35+
return <>{children}</>
3236
}

0 commit comments

Comments
 (0)