Skip to content

Commit 4ee67d2

Browse files
committed
fix: use locationService().getHistory() to get hold of history
1 parent dc6a6e1 commit 4ee67d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/scenes-app/src/home-demo/HomeApp.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import React from 'react';
22
import { Card, useStyles2 } from '@grafana/ui';
3-
import { useHistory } from 'react-router-dom';
43
import { prefixRoute } from '../utils/utils.routing';
54
import { ROUTES } from '../constants';
65
import { GrafanaTheme2, PageLayoutType } from '@grafana/data';
76
import { css } from '@emotion/css';
8-
import { PluginPage } from '@grafana/runtime';
7+
import { PluginPage, locationService } from '@grafana/runtime';
98

109
function getStyles(theme: GrafanaTheme2) {
1110
return {
@@ -29,9 +28,10 @@ function getStyles(theme: GrafanaTheme2) {
2928
};
3029
}
3130

31+
const history = locationService.getHistory();
32+
3233
export const HomePage = () => {
3334
const styles = useStyles2(getStyles);
34-
const history = useHistory();
3535

3636
return (
3737
<PluginPage layout={PageLayoutType.Custom}>

0 commit comments

Comments
 (0)