web: fix rerender of chart
This commit is contained in:
@@ -205,7 +205,12 @@ export default function OverviewMetrics({ projectId }: OverviewMetricsProps) {
|
||||
</WidgetHead>
|
||||
<WidgetBody>
|
||||
<Suspense fallback={<ChartLoading />}>
|
||||
<Chart hideID {...selectedMetric} chartType="linear" />
|
||||
<Chart
|
||||
key={selectedMetric.id}
|
||||
hideID
|
||||
{...selectedMetric}
|
||||
chartType="linear"
|
||||
/>
|
||||
</Suspense>
|
||||
</WidgetBody>
|
||||
</Widget>
|
||||
|
||||
@@ -4,7 +4,11 @@ import { authMiddleware } from '@clerk/nextjs';
|
||||
// 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
|
||||
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 = {
|
||||
|
||||
Reference in New Issue
Block a user