添加用户的看多/看空逻辑
This commit is contained in:
@@ -252,17 +252,17 @@ const HorizontalDynamicNewsEventCard = React.memo(({
|
||||
</Box>
|
||||
</Tooltip>
|
||||
|
||||
{/* 第二行:涨跌幅数据 */}
|
||||
<StockChangeIndicators
|
||||
maxChange={event.related_max_chg}
|
||||
avgChange={event.related_avg_chg}
|
||||
expectationScore={event.expectation_surprise_score}
|
||||
size={indicatorSize}
|
||||
/>
|
||||
{/* 第二行:涨跌幅数据 + 互动指标(右侧) */}
|
||||
<HStack justify="space-between" align="center" w="full">
|
||||
<StockChangeIndicators
|
||||
maxChange={event.related_max_chg}
|
||||
avgChange={event.related_avg_chg}
|
||||
expectationScore={event.expectation_surprise_score}
|
||||
size={indicatorSize}
|
||||
/>
|
||||
|
||||
{/* 第三行:互动指标 - 独立一行更醒目 */}
|
||||
{showEngagement && (
|
||||
<Box mt={0.5}>
|
||||
{/* 互动指标放右侧 */}
|
||||
{showEngagement && (
|
||||
<EventEngagement
|
||||
eventId={event.id}
|
||||
viewCount={event.view_count}
|
||||
@@ -270,11 +270,11 @@ const HorizontalDynamicNewsEventCard = React.memo(({
|
||||
bullishCount={event.bullish_count}
|
||||
bearishCount={event.bearish_count}
|
||||
userVote={event.user_vote}
|
||||
size="sm"
|
||||
size="md"
|
||||
onVoteChange={onVoteChange}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
)}
|
||||
</HStack>
|
||||
</VStack>
|
||||
</CardBody>
|
||||
</Card>
|
||||
|
||||
@@ -52,9 +52,10 @@ const EventEngagement = ({
|
||||
const sizeConfig = {
|
||||
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 },
|
||||
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) => {
|
||||
if (!isLoggedIn) {
|
||||
|
||||
Reference in New Issue
Block a user