-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
master1lan
committed
Jan 14, 2023
1 parent
6c57a61
commit 06ea688
Showing
6 changed files
with
41 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,24 @@ | ||
| import { useAppSelector } from "@store/hooks"; | ||
| import { selectActiveTags } from "@store/tags"; | ||
| import VideoMasonry from "./masonry"; | ||
| import { VideoRouterMasonryType } from "./videotype"; | ||
|
|
||
| type ValueOf<T> = T[keyof T]; | ||
| export default function VideoPage() { | ||
| const activeTags = useAppSelector(selectActiveTags), | ||
| tname = activeTags.find((item) => item.queryType === "tname") | ||
| ?.queryString as ValueOf<Pick<VideoRouterMasonryType, "tname">>, | ||
| copyright = activeTags.find((item) => item.queryType === "copyright") | ||
| ?.queryString as ValueOf<Pick<VideoRouterMasonryType, "copyright">>, | ||
| q = activeTags | ||
| .filter((item) => item.queryType === "q") | ||
| .reduceRight((pre, cur) => { | ||
| return `${cur.queryString}+${pre}`; | ||
| }, ""); | ||
| return ( | ||
| <> | ||
| <VideoMasonry /> | ||
| <VideoMasonry tname={tname} copyright={copyright} /> | ||
| </> | ||
| ); | ||
| } | ||
| //todo 优化搜索设置 | ||
| //todo 重新写q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters