Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/components/layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { usePathname } from "next/navigation"

import { Logo } from "../ui/logo"
import { UserDropdown } from "../user/user-dropdown"
import { TradeTicker } from "./trade-ticker"
import { navigationItems } from "@/constants/navigation"
import { cn } from "@/utils"
import { useMounted } from "@/hooks/use-mounted"
import TradeTicker from "./trade-ticker"

const Header: FC = () => {
const pathname = usePathname()
Expand Down
23 changes: 8 additions & 15 deletions src/components/layout/trade-ticker.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
"use client"

import { useEffect, useState, useRef } from "react"
import { useEffect, useState, useRef, FC } from "react"
import Link from "next/link"
import tradeBumpSocket, { type TradeEvent } from "@/lib/websocket/trade-bump-socket"
import { formatNumberWithSuffix, formatAddressShort } from "@/utils/format"
import { cn } from "@/utils"
import { useRecentTrades } from "@/hooks/pump/use-recent-trades"
import { TickerItem } from "./trade-ticker/trade-ticker.types"
import { de } from "date-fns/locale"

type TickerItem = {
id: string
coinType: string
name: string
symbol: string
kind: "buy" | "sell"
amount: number
trader: string
timestamp: number
}

export function TradeTicker() {
const TradeTicker: FC = () => {
const [trades, setTrades] = useState<TickerItem[]>([])
const scrollRef = useRef<HTMLDivElement>(null)

Expand Down Expand Up @@ -107,5 +98,7 @@ export function TradeTicker() {
<div className="pointer-events-none absolute left-0 top-0 h-full w-20 bg-gradient-to-r from-background to-transparent z-10" />
<div className="pointer-events-none absolute right-0 top-0 h-full w-20 bg-gradient-to-l from-background to-transparent z-10" />
</div>
)
}
);
}

export default TradeTicker;
Empty file.
10 changes: 10 additions & 0 deletions src/components/layout/trade-ticker/trade-ticker.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export type TickerItem = {
id: string
coinType: string
name: string
symbol: string
kind: "buy" | "sell"
amount: number
trader: string
timestamp: number
}
Loading