diff --git a/src/components/swap/SwapChart/index.tsx b/src/components/swap/SwapChart/index.tsx index cc58637..ce8c095 100644 --- a/src/components/swap/SwapChart/index.tsx +++ b/src/components/swap/SwapChart/index.tsx @@ -300,14 +300,14 @@ const SwapChart = () => { {/* setIsMarketDepthOpen(false)} /> */} -
+
{ chartType !== SwapChartView.TICKS ? setIsPoolSwitcherOpen(v => !v)} - className="flex items-center justify-between w-fit min-w-[240px] py-2 px-4 rounded-3xl bg-card border border-card-border hover:bg-card-hover duration-200"> + className="flex items-center justify-between w-fit min-w-[240px] py-2 px-4 ml-auto rounded-3xl bg-card border border-card-border hover:bg-card-hover duration-200">
{pairImage} {pairTitle} @@ -338,7 +338,7 @@ const SwapChart = () => { }
{chartType === SwapChartView.TICKS ? -
+
@@ -390,6 +390,12 @@ const SwapChart = () => { */}
+ { + chartType === SwapChartView.TICKS && +
+ +
+ }
{chartType === SwapChartView.TICKS && !isPoolExists &&
Pool doesn't exists.
} diff --git a/src/components/swap/TicksZoomBar/index.tsx b/src/components/swap/TicksZoomBar/index.tsx index cd06a3f..d362759 100644 --- a/src/components/swap/TicksZoomBar/index.tsx +++ b/src/components/swap/TicksZoomBar/index.tsx @@ -3,9 +3,10 @@ import { Button } from "@/components/ui/button"; interface TicksZoomBarProps { zoom: number; onZoom: (value: number) => void; + onlyZoom?: boolean; } -const TicksZoomBar = ({ zoom, onZoom }: TicksZoomBarProps) => { +const TicksZoomBar = ({ zoom, onZoom, onlyZoom = false }: TicksZoomBarProps) => { const ZOOM_STEP = window.innerWidth < 720 ? 15 : 5; const DEFAULT_ZOOM = window.innerWidth < 720 ? 100 : 50; const MIN_ZOOM = window.innerWidth < 720 ? 50 : 10; @@ -14,35 +15,42 @@ const TicksZoomBar = ({ zoom, onZoom }: TicksZoomBarProps) => { const handleZoomIn = () => zoom < MAX_ZOOM && onZoom(zoom + ZOOM_STEP); const handleZoomOut = () => zoom > MIN_ZOOM && onZoom(zoom - ZOOM_STEP); + if (onlyZoom) { + return ( + <> + + + + ); + } + return ( <> - - ); };