Skip to content

Commit 8b43329

Browse files
authored
Merge pull request #1465 from mars-protocol/develop
v2.9.3
2 parents 23658fa + b2a7702 commit 8b43329

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

src/components/perps/Module/PerpsModule.tsx

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -252,23 +252,29 @@ export function PerpsModule() {
252252
<Text size='xs'>
253253
The selected market is currently disabled, and opening new positions is unavailable.
254254
</Text>
255-
<Text size='xs'>
256-
You have an active position in this market. To manage your exposure, you may still
257-
close your existing position by using the button below.
258-
</Text>
259-
<Text size='xs'>Click the button below to close your position.</Text>
260-
</div>
261-
<div className='flex flex-col gap-4'>
262-
<ActionButton
263-
text='Close Position'
264-
onClick={() => {
265-
closePosition()
266-
}}
267-
/>
268-
<Callout type={CalloutType.INFO}>
269-
Please note: no new positions can be opened until the market is re-enabled.
270-
</Callout>
255+
{currentPerpPosition && (
256+
<>
257+
<Text size='xs'>
258+
You have an active position in this market. To manage your exposure, you may still
259+
close your existing position by using the button below.
260+
</Text>
261+
<Text size='xs'>Click the button below to close your position.</Text>
262+
</>
263+
)}
271264
</div>
265+
{currentPerpPosition && (
266+
<div className='flex flex-col gap-4'>
267+
<ActionButton
268+
text='Close Position'
269+
onClick={() => {
270+
closePosition()
271+
}}
272+
/>
273+
<Callout type={CalloutType.INFO}>
274+
Please note: no new positions can be opened until the market is re-enabled.
275+
</Callout>
276+
</div>
277+
)}
272278
</>
273279
) : (
274280
<>

0 commit comments

Comments
 (0)