diff --git a/packages/scan/src/core/monitor/params/astro/Monitoring.astro b/packages/scan/src/core/monitor/params/astro/Monitoring.astro index 8e77c352..91e89ac6 100644 --- a/packages/scan/src/core/monitor/params/astro/Monitoring.astro +++ b/packages/scan/src/core/monitor/params/astro/Monitoring.astro @@ -1,16 +1,12 @@ --- +import type { MonitoringWithoutRouteProps } from '../..'; // @ts-ignore This file will not be packaged, so the file to be imported should be a .mjs file. import { AstroMonitor } from './component.mjs'; -interface Props { - url?: string; - apiKey: string; -} - -const { apiKey, url } = Astro.props; +type Props = MonitoringWithoutRouteProps; const path = Astro.url.pathname; const params = Astro.params; --- - + diff --git a/packages/scan/src/core/monitor/params/astro/component.ts b/packages/scan/src/core/monitor/params/astro/component.ts index d37b578f..c7c79108 100644 --- a/packages/scan/src/core/monitor/params/astro/component.ts +++ b/packages/scan/src/core/monitor/params/astro/component.ts @@ -1,13 +1,16 @@ import { createElement } from 'react'; -import { Monitoring as BaseMonitoring, type MonitoringWithoutRouteProps } from '../..'; +import { + Monitoring as BaseMonitoring, + type MonitoringWithoutRouteProps, +} from '../..'; import { computeRoute } from '../utils'; -export function AstroMonitor(props: { - url?: string; - apiKey: string; - path: string; - params: Record; -} & MonitoringWithoutRouteProps) { +export function AstroMonitor( + props: { + path: string; + params: Record; + } & MonitoringWithoutRouteProps, +) { const path = props.path; const route = computeRoute(path, props.params);