Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/components/markets/CoinChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default function CoinChart({
pageSize={Number.isFinite(range.bars) ? Math.max(300, range.bars + 10) : 1000}
heightClassName="h-[420px] md:h-[520px]"
onLastBar={onLastBar}
alerts={!symbol.startsWith("COINGECKO:")}
/>
);
}
5 changes: 4 additions & 1 deletion apps/web/components/trading-chart/DrawingToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default function DrawingToolbar({
drawingCount,
onClearAll,
accent,
alerts = true,
}: {
tool: DrawingTool;
onTool: (tool: DrawingTool) => void;
Expand All @@ -90,16 +91,18 @@ export default function DrawingToolbar({
drawingCount: number;
onClearAll: () => void;
accent: AccentClasses;
alerts?: boolean;
}) {
const t = useTranslations("TradingChart");
const tools = alerts ? TOOLS : TOOLS.filter((key) => key !== "alert");
return (
<div
role="toolbar"
aria-label={t("drawing_tools")}
aria-orientation="vertical"
className="flex flex-col items-center gap-0.5 py-2 w-10 shrink-0 border-r border-secondary-border bg-primary-bg no-scrollbar max-sm:overflow-y-auto"
>
{TOOLS.map((key) => (
{tools.map((key) => (
<Button
key={key}
accent={accent}
Expand Down
3 changes: 3 additions & 0 deletions apps/web/components/trading-chart/ProChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ interface Props {
myTrades?: Trade[];
onLastBar?: (bar: Bar | null) => void;
onTrades?: (trades: Trade[]) => void;
alerts?: boolean;
className?: string;
}

Expand All @@ -96,6 +97,7 @@ export default function ProChart({
myTrades,
onLastBar,
onTrades,
alerts = true,
className,
}: Props) {
const t = useTranslations("TradingChart");
Expand Down Expand Up @@ -344,6 +346,7 @@ export default function ProChart({
setSelectedDrawing(null);
}}
accent={accent}
alerts={alerts}
/>
)}
<div className="relative flex-1 min-w-0">
Expand Down
Loading