feat: improve nextjs proxying mode

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-25 11:43:54 +01:00
parent 86903b1937
commit 6da8267509
9 changed files with 184 additions and 94 deletions

View File

@@ -0,0 +1,23 @@
'use client';
import { Button } from '@/components/ui/button';
import { useOpenPanel } from '@openpanel/nextjs';
export default function TestPage() {
const op = useOpenPanel();
return (
<div>
<h1>Test Page</h1>
<Button
onClick={async () => {
const deviceId = await op.fetchDeviceId();
alert(`Device ID: ${deviceId}`);
}}
>
Fetch device id
</Button>
<Button onClick={() => op.track('hello')}>Hello</Button>
<Button onClick={() => op.revenue(100)}>Revenue</Button>
</div>
);
}