chore:little fixes and formating and linting and patches
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import type { IdentifyPayload } from '@openpanel/web';
|
||||
import { filterProps } from './asto-utils';
|
||||
|
||||
interface Props extends IdentifyPayload {}
|
||||
|
||||
const props = Astro.props as Props;
|
||||
|
||||
@@ -11,7 +11,8 @@ type Props = Omit<OpenPanelOptions, 'filter'> & {
|
||||
globalProperties?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
const { profileId, cdnUrl, scriptUrl, globalProperties, ...options } = Astro.props;
|
||||
const { profileId, cdnUrl, scriptUrl, globalProperties, ...options } =
|
||||
Astro.props;
|
||||
|
||||
const CDN_URL = 'https://openpanel.dev/op1.js';
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
import { filterProps } from './asto-utils';
|
||||
|
||||
type Props = Record<string, unknown>;
|
||||
|
||||
const props = Astro.props as Props;
|
||||
|
||||
@@ -2,6 +2,6 @@ const BLACKLISTED_PROPS = ['class'];
|
||||
|
||||
export function filterProps(props: Record<string, unknown>) {
|
||||
return Object.fromEntries(
|
||||
Object.entries(props).filter(([key]) => !BLACKLISTED_PROPS.includes(key)),
|
||||
Object.entries(props).filter(([key]) => !BLACKLISTED_PROPS.includes(key))
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user