添加用户的看多/看空逻辑
This commit is contained in:
@@ -252,7 +252,8 @@ const HorizontalDynamicNewsEventCard = React.memo(({
|
|||||||
</Box>
|
</Box>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
{/* 第二行:涨跌幅数据 */}
|
{/* 第二行:涨跌幅数据 + 互动指标(右侧) */}
|
||||||
|
<HStack justify="space-between" align="center" w="full">
|
||||||
<StockChangeIndicators
|
<StockChangeIndicators
|
||||||
maxChange={event.related_max_chg}
|
maxChange={event.related_max_chg}
|
||||||
avgChange={event.related_avg_chg}
|
avgChange={event.related_avg_chg}
|
||||||
@@ -260,9 +261,8 @@ const HorizontalDynamicNewsEventCard = React.memo(({
|
|||||||
size={indicatorSize}
|
size={indicatorSize}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* 第三行:互动指标 - 独立一行更醒目 */}
|
{/* 互动指标放右侧 */}
|
||||||
{showEngagement && (
|
{showEngagement && (
|
||||||
<Box mt={0.5}>
|
|
||||||
<EventEngagement
|
<EventEngagement
|
||||||
eventId={event.id}
|
eventId={event.id}
|
||||||
viewCount={event.view_count}
|
viewCount={event.view_count}
|
||||||
@@ -270,11 +270,11 @@ const HorizontalDynamicNewsEventCard = React.memo(({
|
|||||||
bullishCount={event.bullish_count}
|
bullishCount={event.bullish_count}
|
||||||
bearishCount={event.bearish_count}
|
bearishCount={event.bearish_count}
|
||||||
userVote={event.user_vote}
|
userVote={event.user_vote}
|
||||||
size="sm"
|
size="md"
|
||||||
onVoteChange={onVoteChange}
|
onVoteChange={onVoteChange}
|
||||||
/>
|
/>
|
||||||
</Box>
|
|
||||||
)}
|
)}
|
||||||
|
</HStack>
|
||||||
</VStack>
|
</VStack>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -52,9 +52,10 @@ const EventEngagement = ({
|
|||||||
const sizeConfig = {
|
const sizeConfig = {
|
||||||
xs: { fontSize: '10px', iconSize: 12, spacing: 1.5, pillPx: 2, pillPy: 0.5 },
|
xs: { fontSize: '10px', iconSize: 12, spacing: 1.5, pillPx: 2, pillPy: 0.5 },
|
||||||
sm: { fontSize: '11px', iconSize: 14, spacing: 2, pillPx: 2.5, pillPy: 1 },
|
sm: { fontSize: '11px', iconSize: 14, spacing: 2, pillPx: 2.5, pillPy: 1 },
|
||||||
md: { fontSize: '12px', iconSize: 16, spacing: 2.5, pillPx: 3, pillPy: 1.5 },
|
md: { fontSize: '13px', iconSize: 18, spacing: 3, pillPx: 3, pillPy: 1.5 },
|
||||||
|
lg: { fontSize: '14px', iconSize: 20, spacing: 3.5, pillPx: 3.5, pillPy: 2 },
|
||||||
};
|
};
|
||||||
const config = sizeConfig[size] || sizeConfig.sm;
|
const config = sizeConfig[size] || sizeConfig.md;
|
||||||
|
|
||||||
const handleVote = useCallback(async (voteType) => {
|
const handleVote = useCallback(async (voteType) => {
|
||||||
if (!isLoggedIn) {
|
if (!isLoggedIn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user