Skip to content

Commit

Permalink
πŸ› fix: return ν‚€μ›Œλ“œ μ‚­μ œ
Browse files Browse the repository at this point in the history
  • Loading branch information
baegyeong committed Nov 18, 2024
1 parent 4f60f9b commit ea31cb8
Showing 1 changed file with 25 additions and 30 deletions.
55 changes: 25 additions & 30 deletions packages/frontend/src/pages/stocks/StockRankingTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,32 @@ export const StockRankingTable = () => {
</tr>
</thead>
<tbody>
{stockData.data.map((stock, index) => {
return (
<tr
key={stock.id}
className="display-medium14 text-dark-gray text-right [&>*]:p-4"
>
<td className="flex gap-6 text-left">
<span className="text-gray">{index + 1}</span>
<Link
to={`${stock.id}`}
className="display-bold14 hover:text-orange cursor-pointer text-ellipsis hover:underline"
>
{stock.name}
</Link>
</td>
<td>{stock.currentPrice.toLocaleString()}원</td>
<td
className={cn(
stock.changeRate >= 0 ? 'text-red' : 'text-blue',
)}
{stockData.data.map((stock, index) => (
<tr
key={stock.id}
className="display-medium14 text-dark-gray text-right [&>*]:p-4"
>
<td className="flex gap-6 text-left">
<span className="text-gray">{index + 1}</span>
<Link
to={`${stock.id}`}
className="display-bold14 hover:text-orange cursor-pointer text-ellipsis hover:underline"
>
{stock.changeRate >= 0 && '+'}
{stock.changeRate.toLocaleString()}원 (
{stock.changeRatePercent}
%)
</td>
<td>{stock.tradingVolume.toLocaleString()}원</td>
<td>{stock.tradingValue.toLocaleString()}μ£Ό</td>
</tr>
);
})}
{stock.name}
</Link>
</td>
<td>{stock.currentPrice.toLocaleString()}원</td>
<td
className={cn(stock.changeRate >= 0 ? 'text-red' : 'text-blue')}
>
{stock.changeRate >= 0 && '+'}
{stock.changeRate.toLocaleString()}원 ({stock.changeRatePercent}
%)
</td>
<td>{stock.tradingVolume.toLocaleString()}원</td>
<td>{stock.tradingValue.toLocaleString()}μ£Ό</td>
</tr>
))}
</tbody>
</table>
</div>
Expand Down

0 comments on commit ea31cb8

Please sign in to comment.