Skip to content

Commit

Permalink
🐛 fix(custom): 修复手机端视频页面和搜索结果页未居中bug,修复eu页修改搜索参数造成的一次性加载完成情况
Browse files Browse the repository at this point in the history
  • Loading branch information
master1lan committed Mar 31, 2023
1 parent c659926 commit 091c044
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/routers/online/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/**
*
*/
import { useSetEuFetchParamas } from "@store/euWhatLook";
import { useGetEuFetchParmas, useSetEuFetchParamas } from "@store/euWhatLook";
import Content from "./content";
import { useEffect } from "react";
export default function Index() {
const handerSetEuParmas = useSetEuFetchParamas();
useEffect(handerSetEuParmas.bind(null, "online"), []);
const effectDeps = useGetEuFetchParmas();
useEffect(() => {
//在滚动的过程切换参数应该自动滚动到顶端防止一次性加载完成
window.scrollTo({ top: 0 });
}, [effectDeps]);
return (
<div className='feedContainer'>
<Content />
Expand Down
2 changes: 1 addition & 1 deletion src/routers/video/masonry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const NormalVideoRes: FC<{
}> = ({ loading, isEmpty, data }) => {
return (
<Grid
className='max-w-full'
className='max-w-full mx-auto'
container
spacing={{
lg: 2,
Expand Down

0 comments on commit 091c044

Please sign in to comment.