mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-09 12:09:57 +02:00
feat(artists): preserve artist detail scroll position on back navigation (#2045)
* feat(artists): preserve artist detail scroll position on back navigation * fix(artists): target OverlayScrollbars viewport child for scroll persistence Signed-off-by: Sai Asish Y <say.apm35@gmail.com> --------- Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { useParams } from 'react-router';
|
||||
|
||||
import { useItemImageUrl } from '/@/renderer/components/item-image/item-image';
|
||||
import { NativeScrollArea } from '/@/renderer/components/native-scroll-area/native-scroll-area';
|
||||
import { useNativeScrollPersist } from '/@/renderer/components/native-scroll-area/use-native-scroll-persist';
|
||||
import { albumQueries } from '/@/renderer/features/albums/api/album-api';
|
||||
import { artistsQueries } from '/@/renderer/features/artists/api/artists-api';
|
||||
import { AlbumArtistDetailContent } from '/@/renderer/features/artists/components/album-artist-detail-content';
|
||||
@@ -28,6 +29,8 @@ const AlbumArtistDetailRouteContent = () => {
|
||||
const serverId = useCurrentServerId();
|
||||
const { artistBackground, artistBackgroundBlur } = useArtistBackground();
|
||||
|
||||
useNativeScrollPersist({ enabled: true, scrollRef: scrollAreaRef });
|
||||
|
||||
const { albumArtistId, artistId } = useParams() as {
|
||||
albumArtistId?: string;
|
||||
artistId?: string;
|
||||
|
||||
Reference in New Issue
Block a user