diff --git a/app/examples/react-16/src/App.js b/app/examples/react-16/src/App.js index 69e6e6d6..6c89ff54 100644 --- a/app/examples/react-16/src/App.js +++ b/app/examples/react-16/src/App.js @@ -15,5 +15,5 @@ async function fetchToken() { } export default function App() { - return + return } diff --git a/app/examples/react-17/src/App.js b/app/examples/react-17/src/App.js index 0e264539..6c89ff54 100644 --- a/app/examples/react-17/src/App.js +++ b/app/examples/react-17/src/App.js @@ -15,5 +15,5 @@ async function fetchToken() { } export default function App() { - return + return } diff --git a/app/examples/react-18/src/App.jsx b/app/examples/react-18/src/App.jsx index 54ea2665..6c89ff54 100644 --- a/app/examples/react-18/src/App.jsx +++ b/app/examples/react-18/src/App.jsx @@ -15,5 +15,5 @@ async function fetchToken() { } export default function App() { - return + return } diff --git a/packages/examples/dashboard/src/components/Dashboard/Dashboard.tsx b/packages/examples/dashboard/src/components/Dashboard/Dashboard.tsx index 92bd29a8..3768bde9 100644 --- a/packages/examples/dashboard/src/components/Dashboard/Dashboard.tsx +++ b/packages/examples/dashboard/src/components/Dashboard/Dashboard.tsx @@ -28,10 +28,9 @@ const GlobalStyles = () => { interface DashboardProps extends DashboardCommonProps { fetchToken: () => Promise - reactVersion: string } -export const Dashboard = ({ fetchToken, reactVersion, envs }: DashboardProps) => { +export const Dashboard = ({ fetchToken, envs }: DashboardProps) => { const [theme, setTheme] = React.useState('lightTheme') return ( @@ -40,7 +39,7 @@ export const Dashboard = ({ fetchToken, reactVersion, envs }: DashboardProps) =>

- React {reactVersion} Testing App + React {React.version} Testing App diff --git a/packages/ui-kit/src/components/Counter/Counter.test.tsx b/packages/ui-kit/src/components/Counter/Counter.test.tsx index 34b08d01..e96658eb 100644 --- a/packages/ui-kit/src/components/Counter/Counter.test.tsx +++ b/packages/ui-kit/src/components/Counter/Counter.test.tsx @@ -12,7 +12,17 @@ const mockData = { const handlers = [ mockCounterQuery((req, res, ctx) => { - const { metricName } = req.variables.counterInput + const { metricName, timeZone } = req.variables.counterInput + + if (metricName === 'test-time-zone') { + return res( + ctx.data({ + counter: { + value: timeZone + } + }) + ) + } if (metricName === 'lack-of-data') { return res( @@ -157,6 +167,37 @@ describe('Counter', () => { await dom.findByText('true') }) + it('Should pass timeZone to the query', async () => { + dom = render( + + ) + + await dom.findByText('Europe/Rome') + }) + + it('Should pass query.timeZone to the query', async () => { + dom = render( + + ) + + await dom.findByText('Europe/Berlin') + }) + it('Should NOT fetch data in static mode', async () => { mockServer.events.on('request:start', async () => { throw new Error('Should not fetch data in static mode') diff --git a/packages/ui-kit/src/components/Leaderboard/Leaderboard.tsx b/packages/ui-kit/src/components/Leaderboard/Leaderboard.tsx index 771d45cc..c393dcc1 100644 --- a/packages/ui-kit/src/components/Leaderboard/Leaderboard.tsx +++ b/packages/ui-kit/src/components/Leaderboard/Leaderboard.tsx @@ -202,7 +202,7 @@ export const LeaderboardComponent = React.forwardRef if (chartRef.current) { const chart = chartRef.current - // const newOptions = // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore chart.options = { ...config.options } @@ -244,7 +243,7 @@ export const PieChartComponent = React.forwardRef chart.data = { ...config.data } } - chart.update() + chart.update('none') return } diff --git a/packages/ui-kit/src/components/TimeSeries/TimeSeries.tsx b/packages/ui-kit/src/components/TimeSeries/TimeSeries.tsx index 26eb38c8..6d1e258b 100644 --- a/packages/ui-kit/src/components/TimeSeries/TimeSeries.tsx +++ b/packages/ui-kit/src/components/TimeSeries/TimeSeries.tsx @@ -246,7 +246,7 @@ export const TimeSeriesComponent = React.forwardRef