Skip to content

Commit

Permalink
remove timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
salazarm committed Apr 25, 2024
1 parent bd9ba7c commit ff073fa
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions js_modules/dagster-ui/packages/ui-core/src/app/analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export interface GenericAnalytics {

export const AnalyticsContext = createContext<GenericAnalytics>(undefined!);

const PAGEVIEW_DELAY = 300;

export const usePageContext = () => {
const match = useRouteMatch();
const {pathname: specificPath} = useLocation();
Expand Down Expand Up @@ -55,14 +53,7 @@ export const useTrackPageView = () => {
const {path, specificPath} = usePageContext();

useEffect(() => {
// Wait briefly to allow redirects.
const timer = setTimeout(() => {
analytics.page(path, specificPath);
}, PAGEVIEW_DELAY);

return () => {
clearTimeout(timer);
};
analytics.page(path, specificPath);
}, [analytics, path, specificPath]);
};

Expand Down

0 comments on commit ff073fa

Please sign in to comment.