From a5d72e264d56b58a4bdd15f80ed70e26363d5294 Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Fri, 11 Oct 2024 16:33:01 +0300 Subject: [PATCH] DataTrailsApp: Update to react-router v6 (#94447) * DataTrailsApp: Update router * Update route --- public/app/features/trails/DataTrailsApp.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/public/app/features/trails/DataTrailsApp.tsx b/public/app/features/trails/DataTrailsApp.tsx index a3b7c8ec46a..a3057fa4b66 100644 --- a/public/app/features/trails/DataTrailsApp.tsx +++ b/public/app/features/trails/DataTrailsApp.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { Route, Switch } from 'react-router-dom'; +import { Routes, Route } from 'react-router-dom-v5-compat'; import { PageLayoutType } from '@grafana/data'; import { locationService } from '@grafana/runtime'; @@ -32,11 +32,11 @@ export class DataTrailsApp extends SceneObjectBase { const { trail, home } = model.useState(); return ( - + + {/* The routes are relative to the HOME_ROUTE */} ( + path={'/'} + element={ { > - )} + } /> - } /> - + } /> + ); }; }