diff --git a/frontend/context/StakingContractInfoProvider.tsx b/frontend/context/StakingContractInfoProvider.tsx index 82d037b14..c53300e0c 100644 --- a/frontend/context/StakingContractInfoProvider.tsx +++ b/frontend/context/StakingContractInfoProvider.tsx @@ -2,7 +2,7 @@ import { createContext, PropsWithChildren, useEffect, useState } from 'react'; import { AutonolasService } from '@/service/Autonolas'; -type StakingContractInfoProviderContextType = { +type StakingContractInfoContextProps = { isStakingContractInfoLoading: boolean; isRewardsAvailable: boolean; hasEnoughServiceSlots: boolean; @@ -10,8 +10,8 @@ type StakingContractInfoProviderContextType = { canStartAgent: boolean; }; -export const StakingContractInfoProviderContext = - createContext({ +export const StakingContractInfoContext = + createContext({ isStakingContractInfoLoading: true, isRewardsAvailable: false, hasEnoughServiceSlots: false, @@ -19,7 +19,7 @@ export const StakingContractInfoProviderContext = canStartAgent: false, }); -export const StakingContractInfoProviderProvider = ({ +export const StakingContractInfoProvider = ({ children, }: PropsWithChildren) => { const [isStakingContractInfoLoading, setIsStakingContractInfoLoading] = @@ -55,7 +55,7 @@ export const StakingContractInfoProviderProvider = ({ }, []); return ( - {children} - + ); }; diff --git a/frontend/hooks/useStakingContractInfo.ts b/frontend/hooks/useStakingContractInfo.ts index 03a266aeb..69301068e 100644 --- a/frontend/hooks/useStakingContractInfo.ts +++ b/frontend/hooks/useStakingContractInfo.ts @@ -1,6 +1,6 @@ import { useContext } from 'react'; -import { StakingContractInfoProviderContext } from '@/context/StakingContractInfoProvider'; +import { StakingContractInfoContext } from '@/context/StakingContractInfoProvider'; export const useStakingContractInfo = () => { const { @@ -9,7 +9,7 @@ export const useStakingContractInfo = () => { isAgentEvicted, isRewardsAvailable, isStakingContractInfoLoading, - } = useContext(StakingContractInfoProviderContext); + } = useContext(StakingContractInfoContext); return { canStartAgent, diff --git a/frontend/pages/_app.tsx b/frontend/pages/_app.tsx index 30fe0807b..4cbfa6f85 100644 --- a/frontend/pages/_app.tsx +++ b/frontend/pages/_app.tsx @@ -12,7 +12,7 @@ import { MasterSafeProvider } from '@/context/MasterSafeProvider'; import { OnlineStatusProvider } from '@/context/OnlineStatusProvider'; import { RewardProvider } from '@/context/RewardProvider'; import { SettingsProvider } from '@/context/SettingsProvider'; -import { StakingContractInfoProviderProvider } from '@/context/StakingContractInfoProvider'; +import { StakingContractInfoProvider } from '@/context/StakingContractInfoProvider'; import { StoreProvider } from '@/context/StoreProvider'; import { WalletProvider } from '@/context/WalletProvider'; import { mainTheme } from '@/theme'; @@ -39,7 +39,7 @@ export default function App({ Component, pageProps }: AppProps) { - + {isMounted ? ( @@ -47,7 +47,7 @@ export default function App({ Component, pageProps }: AppProps) { ) : null} - +