web: fix rerender of chart
This commit is contained in:
@@ -205,7 +205,12 @@ export default function OverviewMetrics({ projectId }: OverviewMetricsProps) {
|
|||||||
</WidgetHead>
|
</WidgetHead>
|
||||||
<WidgetBody>
|
<WidgetBody>
|
||||||
<Suspense fallback={<ChartLoading />}>
|
<Suspense fallback={<ChartLoading />}>
|
||||||
<Chart hideID {...selectedMetric} chartType="linear" />
|
<Chart
|
||||||
|
key={selectedMetric.id}
|
||||||
|
hideID
|
||||||
|
{...selectedMetric}
|
||||||
|
chartType="linear"
|
||||||
|
/>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</WidgetBody>
|
</WidgetBody>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|||||||
@@ -4,7 +4,11 @@ import { authMiddleware } from '@clerk/nextjs';
|
|||||||
// Please edit this to allow other routes to be public as needed.
|
// Please edit this to allow other routes to be public as needed.
|
||||||
// See https://clerk.com/docs/references/nextjs/auth-middleware for more information about configuring your Middleware
|
// See https://clerk.com/docs/references/nextjs/auth-middleware for more information about configuring your Middleware
|
||||||
export default authMiddleware({
|
export default authMiddleware({
|
||||||
publicRoutes: ['/share/overview/:id', '/api/trpc/chart.chart'],
|
publicRoutes: [
|
||||||
|
'/share/overview/:id',
|
||||||
|
'/api/trpc/chart.chart',
|
||||||
|
'/api/trpc/chart.values',
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
|
|||||||
Reference in New Issue
Block a user