sdk(astro,nextjs): add astro sdk and ensure window.op always first on nextjs
This commit is contained in:
9
packages/sdks/astro/src/IdentifyComponent.astro
Normal file
9
packages/sdks/astro/src/IdentifyComponent.astro
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
import type { IdentifyPayload } from '@openpanel/web';
|
||||
import { filterProps } from './asto-utils';
|
||||
interface Props extends IdentifyPayload {}
|
||||
|
||||
const props = Astro.props as Props;
|
||||
---
|
||||
|
||||
<script is:inline set:html={`window.op('identify', ${JSON.stringify(filterProps(props))});`} />
|
||||
Reference in New Issue
Block a user