Replace react-router-scroll-4 with inlined implementation (#36253)
This commit is contained in:
parent
6d2493ca7c
commit
d801cf8e59
12 changed files with 302 additions and 72 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import type { PropsWithChildren } from 'react';
|
||||
import type React from 'react';
|
||||
|
||||
import type { useLocation } from 'react-router';
|
||||
import { Router as OriginalRouter, useHistory } from 'react-router';
|
||||
|
||||
import type {
|
||||
|
|
@ -18,7 +19,9 @@ interface MastodonLocationState {
|
|||
mastodonModalKey?: string;
|
||||
}
|
||||
|
||||
type LocationState = MastodonLocationState | null | undefined;
|
||||
export type LocationState = MastodonLocationState | null | undefined;
|
||||
|
||||
export type MastodonLocation = ReturnType<typeof useLocation<LocationState>>;
|
||||
|
||||
type HistoryPath = Path | LocationDescriptor<LocationState>;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { connect } from 'react-redux';
|
|||
import { supportsPassiveEvents } from 'detect-passive-events';
|
||||
import { throttle } from 'lodash';
|
||||
|
||||
import ScrollContainer from 'mastodon/containers/scroll_container';
|
||||
import { ScrollContainer } from 'mastodon/containers/scroll_container';
|
||||
|
||||
import IntersectionObserverArticleContainer from '../containers/intersection_observer_article_container';
|
||||
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../features/ui/util/fullscreen';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue