From 79a16b85620c9e5e1283e146ca7ebdf599a1d294 Mon Sep 17 00:00:00 2001
From: "m.ray" <16125548+MadalinaRaicu@users.noreply.github.com>
Date: Thu, 16 Nov 2023 19:08:20 +0200
Subject: [PATCH] fix(trading): show deal ticket in sidebar by default (#5292)
---
.../client-pages/markets/markets-sidebar.tsx | 23 ++++++-------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/apps/trading/client-pages/markets/markets-sidebar.tsx b/apps/trading/client-pages/markets/markets-sidebar.tsx
index 7f010c47f..cc6edc3ef 100644
--- a/apps/trading/client-pages/markets/markets-sidebar.tsx
+++ b/apps/trading/client-pages/markets/markets-sidebar.tsx
@@ -1,7 +1,5 @@
-import { Route, Routes, useParams } from 'react-router-dom';
-import { MarketState } from '@vegaprotocol/types';
+import { Route, Routes } from 'react-router-dom';
import { t } from '@vegaprotocol/i18n';
-import { useMarket } from '@vegaprotocol/markets';
import { VegaIconNames } from '@vegaprotocol/ui-toolkit';
import {
SidebarButton,
@@ -11,12 +9,7 @@ import {
import { useGetCurrentRouteId } from '../../lib/hooks/use-get-current-route-id';
export const MarketsSidebar = () => {
- const { marketId } = useParams();
const currentRouteId = useGetCurrentRouteId();
- const { data } = useMarket(marketId);
- const active =
- data &&
- [MarketState.STATE_ACTIVE, MarketState.STATE_PENDING].includes(data.state);
return (
<>
@@ -44,14 +37,12 @@ export const MarketsSidebar = () => {
element={
<>
- {active && (
-
- )}
+