diff --git a/src/components/TimeLine/utils.js b/src/components/TimeLine/utils.js index d7f7b6a2..00915735 100644 --- a/src/components/TimeLine/utils.js +++ b/src/components/TimeLine/utils.js @@ -29,7 +29,11 @@ const keys_1 = [uuidv4(), uuidv4(), uuidv4(), uuidv4(),uuidv4()]; const keys_2 = [uuidv4(), uuidv4(), uuidv4(), uuidv4(),uuidv4()]; export const GetDepartureText = (connection, t) => { - const isMobile = useMediaQuery('(max-width:600px)'); + let isMobile = window.innerWidth <= 600; + + window.addEventListener('resize', () => { + isMobile = window.innerWidth <= 600; + }); if (!!!connection) { return ;