File tree Expand file tree Collapse file tree 1 file changed +22
-16
lines changed
src/components/perps/Module Expand file tree Collapse file tree 1 file changed +22
-16
lines changed Original file line number Diff line number Diff 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 < >
You can’t perform that action at this time.
0 commit comments