perf: optimize all home page components

This commit is contained in:
wonfen
2025-03-17 11:47:02 +08:00
parent 6239f81f36
commit 105de99d06
13 changed files with 1612 additions and 1726 deletions

View File

@@ -201,7 +201,7 @@ const HomeSettingsDialog = ({
const HomePage = () => {
const { t } = useTranslation();
const { verge } = useVerge();
const { current } = useProfiles();
const { current, mutateProfiles } = useProfiles();
const navigate = useNavigate();
const theme = useTheme();
@@ -275,7 +275,10 @@ const HomePage = () => {
{/* 订阅和当前节点部分 */}
{homeCards.profile && (
<Grid size={6}>
<HomeProfileCard current={current} />
<HomeProfileCard
current={current}
onProfileUpdated={mutateProfiles}
/>
</Grid>
)}