fix: add ScaleOfImpact to MDX routes and ignore transient Next.js Server Action errors in Sentry
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { notFound, redirect } from 'next/navigation';
|
import { notFound, redirect } from 'next/navigation';
|
||||||
import { getImageProps } from 'next/image';
|
import { getImageProps } from 'next/image';
|
||||||
|
import { ScaleOfImpact } from '@/components/blocks/ScaleOfImpact';
|
||||||
import { Container, Badge, Heading } from '@/components/ui';
|
import { Container, Badge, Heading } from '@/components/ui';
|
||||||
import { getTranslations, setRequestLocale } from 'next-intl/server';
|
import { getTranslations, setRequestLocale } from 'next-intl/server';
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
@@ -55,6 +56,7 @@ const mdxComponents = {
|
|||||||
GrowthChart,
|
GrowthChart,
|
||||||
DeepDrillAnimation,
|
DeepDrillAnimation,
|
||||||
DataGridPulse,
|
DataGridPulse,
|
||||||
|
ScaleOfImpact,
|
||||||
ResponsiveImage: (props: any) => {
|
ResponsiveImage: (props: any) => {
|
||||||
let src = props.src;
|
let src = props.src;
|
||||||
if (typeof src === 'string' && src.startsWith('/_next/image')) {
|
if (typeof src === 'string' && src.startsWith('/_next/image')) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { notFound, redirect } from 'next/navigation';
|
import { notFound, redirect } from 'next/navigation';
|
||||||
import { getImageProps } from 'next/image';
|
import { getImageProps } from 'next/image';
|
||||||
|
import { ScaleOfImpact } from '@/components/blocks/ScaleOfImpact';
|
||||||
import JsonLd from '@/components/JsonLd';
|
import JsonLd from '@/components/JsonLd';
|
||||||
import { SITE_URL } from '@/lib/schema';
|
import { SITE_URL } from '@/lib/schema';
|
||||||
import {
|
import {
|
||||||
@@ -25,6 +26,7 @@ const mdxComponents = {
|
|||||||
h2: (props: any) => <Heading level={2} size="3" className="mt-16 mb-6 border-b border-neutral-100 pb-4" {...props} />,
|
h2: (props: any) => <Heading level={2} size="3" className="mt-16 mb-6 border-b border-neutral-100 pb-4" {...props} />,
|
||||||
h3: (props: any) => <Heading level={3} size="4" className="mt-12 mb-4 text-primary" {...props} />,
|
h3: (props: any) => <Heading level={3} size="4" className="mt-12 mb-4 text-primary" {...props} />,
|
||||||
h4: (props: any) => <Heading level={4} size="5" className="mt-8 mb-4 uppercase tracking-widest text-neutral-500" {...props} />,
|
h4: (props: any) => <Heading level={4} size="5" className="mt-8 mb-4 uppercase tracking-widest text-neutral-500" {...props} />,
|
||||||
|
ScaleOfImpact,
|
||||||
ResponsiveImage: (props: any) => {
|
ResponsiveImage: (props: any) => {
|
||||||
let src = props.src;
|
let src = props.src;
|
||||||
if (typeof src === 'string' && src.startsWith('/_next/image')) {
|
if (typeof src === 'string' && src.startsWith('/_next/image')) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Container, Heading, Badge } from '@/components/ui';
|
import { Container, Heading, Badge } from '@/components/ui';
|
||||||
import { getImageProps } from 'next/image';
|
import { getImageProps } from 'next/image';
|
||||||
|
import { ScaleOfImpact } from '@/components/blocks/ScaleOfImpact';
|
||||||
import { getTranslations, setRequestLocale } from 'next-intl/server';
|
import { getTranslations, setRequestLocale } from 'next-intl/server';
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
import { getAllReferences } from '@/lib/references';
|
import { getAllReferences } from '@/lib/references';
|
||||||
@@ -41,6 +42,7 @@ const mdxComponents = {
|
|||||||
li: CustomLi,
|
li: CustomLi,
|
||||||
p: (props: any) => <p className="text-neutral-600 text-sm mb-4 leading-relaxed" {...props} />,
|
p: (props: any) => <p className="text-neutral-600 text-sm mb-4 leading-relaxed" {...props} />,
|
||||||
Heading,
|
Heading,
|
||||||
|
ScaleOfImpact,
|
||||||
ResponsiveImage: (props: any) => {
|
ResponsiveImage: (props: any) => {
|
||||||
let src = props.src;
|
let src = props.src;
|
||||||
if (typeof src === 'string' && src.startsWith('/_next/image')) {
|
if (typeof src === 'string' && src.startsWith('/_next/image')) {
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ export class GlitchtipErrorReportingService implements ErrorReportingService {
|
|||||||
tracesSampleRate: this.options.tracesSampleRate ?? 0.1,
|
tracesSampleRate: this.options.tracesSampleRate ?? 0.1,
|
||||||
replaysOnErrorSampleRate: 1.0,
|
replaysOnErrorSampleRate: 1.0,
|
||||||
replaysSessionSampleRate: 0.1,
|
replaysSessionSampleRate: 0.1,
|
||||||
|
ignoreErrors: [
|
||||||
|
'Failed to find Server Action. This request might be from an older or newer deployment.',
|
||||||
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return Sentry;
|
return Sentry;
|
||||||
|
|||||||
Reference in New Issue
Block a user