Skip to content

Commit

Permalink
Remove unnecessary scroll to top on mount for top level query pages (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
WithoutPants authored Oct 29, 2024
1 parent 1b7e729 commit edb66bd
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 23 deletions.
3 changes: 0 additions & 3 deletions ui/v2.5/src/components/Galleries/Galleries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useTitleProps } from "src/hooks/title";
import Gallery from "./GalleryDetails/Gallery";
import GalleryCreate from "./GalleryDetails/GalleryCreate";
import { GalleryList } from "./GalleryList";
import { useScrollToTopOnMount } from "src/hooks/scrollToTop";
import { View } from "../List/views";
import { LoadingIndicator } from "../Shared/LoadingIndicator";
import { ErrorMessage } from "../Shared/ErrorMessage";
Expand Down Expand Up @@ -41,8 +40,6 @@ const GalleryImage: React.FC<RouteComponentProps<IGalleryImageParams>> = ({
};

const Galleries: React.FC = () => {
useScrollToTopOnMount();

return <GalleryList view={View.Galleries} />;
};

Expand Down
3 changes: 0 additions & 3 deletions ui/v2.5/src/components/Groups/Groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ import { useTitleProps } from "src/hooks/title";
import Group from "./GroupDetails/Group";
import GroupCreate from "./GroupDetails/GroupCreate";
import { GroupList } from "./GroupList";
import { useScrollToTopOnMount } from "src/hooks/scrollToTop";
import { View } from "../List/views";

const Groups: React.FC = () => {
useScrollToTopOnMount();

return <GroupList view={View.Groups} />;
};

Expand Down
3 changes: 0 additions & 3 deletions ui/v2.5/src/components/Images/Images.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ import { Helmet } from "react-helmet";
import { useTitleProps } from "src/hooks/title";
import Image from "./ImageDetails/Image";
import { ImageList } from "./ImageList";
import { useScrollToTopOnMount } from "src/hooks/scrollToTop";
import { View } from "../List/views";

const Images: React.FC = () => {
useScrollToTopOnMount();

return <ImageList view={View.Images} />;
};

Expand Down
3 changes: 0 additions & 3 deletions ui/v2.5/src/components/Performers/Performers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ import { useTitleProps } from "src/hooks/title";
import Performer from "./PerformerDetails/Performer";
import PerformerCreate from "./PerformerDetails/PerformerCreate";
import { PerformerList } from "./PerformerList";
import { useScrollToTopOnMount } from "src/hooks/scrollToTop";
import { View } from "../List/views";

const Performers: React.FC = () => {
useScrollToTopOnMount();

return <PerformerList view={View.Performers} />;
};

Expand Down
5 changes: 0 additions & 5 deletions ui/v2.5/src/components/Scenes/Scenes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Route, Switch } from "react-router-dom";
import { Helmet } from "react-helmet";
import { useTitleProps } from "src/hooks/title";
import { lazyComponent } from "src/utils/lazyComponent";
import { useScrollToTopOnMount } from "src/hooks/scrollToTop";
import { View } from "../List/views";

const SceneList = lazyComponent(() => import("./SceneList"));
Expand All @@ -12,14 +11,10 @@ const Scene = lazyComponent(() => import("./SceneDetails/Scene"));
const SceneCreate = lazyComponent(() => import("./SceneDetails/SceneCreate"));

const Scenes: React.FC = () => {
useScrollToTopOnMount();

return <SceneList view={View.Scenes} />;
};

const SceneMarkers: React.FC = () => {
useScrollToTopOnMount();

const titleProps = useTitleProps({ id: "markers" });
return (
<>
Expand Down
3 changes: 0 additions & 3 deletions ui/v2.5/src/components/Studios/Studios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ import { useTitleProps } from "src/hooks/title";
import Studio from "./StudioDetails/Studio";
import StudioCreate from "./StudioDetails/StudioCreate";
import { StudioList } from "./StudioList";
import { useScrollToTopOnMount } from "src/hooks/scrollToTop";
import { View } from "../List/views";

const Studios: React.FC = () => {
useScrollToTopOnMount();

return <StudioList view={View.Studios} />;
};

Expand Down
3 changes: 0 additions & 3 deletions ui/v2.5/src/components/Tags/Tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import { useTitleProps } from "src/hooks/title";
import Tag from "./TagDetails/Tag";
import TagCreate from "./TagDetails/TagCreate";
import { TagList } from "./TagList";
import { useScrollToTopOnMount } from "src/hooks/scrollToTop";

const Tags: React.FC = () => {
useScrollToTopOnMount();

return <TagList />;
};

Expand Down

0 comments on commit edb66bd

Please sign in to comment.