Skip to content

Commit 45b80f2

Browse files
committed
fix: loading state
1 parent 92d5e74 commit 45b80f2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/modules/sGho/SGhoDepositPanel.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Button,
88
Divider,
99
Grid,
10+
Skeleton,
1011
Stack,
1112
SvgIcon,
1213
Typography,
@@ -32,7 +33,6 @@ import { GENERAL } from 'src/utils/events';
3233
import { MeritApyDataItem } from '../reserve-overview/graphs/MeritApyGraph';
3334
import { MeritApyGraphContainer } from '../reserve-overview/graphs/MeritApyGraphContainer';
3435
import { StakeActionBox } from '../staking/StakeActionBox';
35-
import { StakingPanelSkeleton } from '../staking/StakingPanelSkeleton';
3636

3737
// Memoized chart component to prevent unnecessary re-renders
3838
const MemoizedMeritApyChart = memo(
@@ -112,8 +112,10 @@ export const SGHODepositPanel: React.FC<SGHODepositPanelProps> = ({
112112

113113
// Handle different states properly
114114
if (!stakeData) {
115-
// Data still loading
116-
return <StakingPanelSkeleton />;
115+
// TODO: Do we want to use a skeleton here?
116+
return <Skeleton variant="rectangular" width={'100%'} height={600} />;
117+
118+
return null;
117119
}
118120

119121
const handleSwitchClick = () => {
@@ -152,7 +154,7 @@ export const SGHODepositPanel: React.FC<SGHODepositPanelProps> = ({
152154

153155
return (
154156
<>
155-
{currentAccount && stakeUserData && (
157+
{currentAccount && (
156158
<>
157159
<Grid container spacing={{ xs: 1, md: 2 }} sx={{ mb: 4 }}>
158160
<Grid item xs={12} md={2}>

0 commit comments

Comments
 (0)