Skip to content

Let's use AI to Earn!

fix(热门内容): 修复热门内容过滤条件更改后不会更新的bug

gaoSir672643c3613a
diff --git a/src/app/[lng]/hotContent/components/HotContent/index.tsx b/src/app/[lng]/hotContent/components/HotContent/index.tsx
index eb486d07..fef0dfec 100644
--- a/src/app/[lng]/hotContent/components/HotContent/index.tsx
+++ b/src/app/[lng]/hotContent/components/HotContent/index.tsx
@@ -299,7 +299,10 @@ const HotContent = memo(
<HotContentLabel
labels={["全部", ...(selectedLabelInfo.labelData ?? [])]}
value={labelValue}
- onChange={(value) => setLabelValue(value)}
+ onChange={(value) => {
+ setLabelValue(value);
+ setIsReset(true);
+ }}
/>
<div className="hotContent-options">
@@ -311,7 +314,10 @@ const HotContent = memo(
value: v.value,
}))}
value={dateValue}
- onChange={(e) => setDateValue(e)}
+ onChange={(e) => {
+ setDateValue(e);
+ setIsReset(true);
+ }}
></Select>
</div>