chore(root): migrate to biome

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-16 12:20:40 +02:00
parent 1f6e198336
commit 32e91959f6
383 changed files with 1943 additions and 3085 deletions

View File

@@ -2,5 +2,5 @@
- `trackScreenViews` - If true, the library will automatically track screen views (default: false)
- `trackOutgoingLinks` - If true, the library will automatically track outgoing links (default: false)
- `trackAttributes` - If true, you can trigger events by using html attributes (`<button data-track="your_event" />`) (default: false)
- `trackAttributes` - If true, you can trigger events by using html attributes (`<button type="button" data-track="your_event" />`) (default: false)

View File

@@ -7,4 +7,4 @@
"title": "Documentation",
"type": "page"
}
}
}

View File

@@ -3,4 +3,4 @@
"sdks": "SDKs",
"migration": "Migrations",
"self-hosting": "Self-hosting"
}
}

View File

@@ -1,3 +1,3 @@
{
"beta-v1": "Beta to v1"
}
}

View File

@@ -16,4 +16,4 @@
"javascript": "JavaScript",
"api": "API",
"export": "Export"
}
}

View File

@@ -99,7 +99,7 @@ import { useOpenPanel } from '@openpanel/nextjs';
function YourComponent() {
const op = useOpenPanel();
return <button onClick={() => op.track('my_event', { foo: 'bar' })}>Trigger event</button>
return <button type="button" onClick={() => op.track('my_event', { foo: 'bar' })}>Trigger event</button>
}
```

View File

@@ -36,13 +36,13 @@ Just insert this snippet and replace `YOUR_CLIENT_ID` with your client id.
You can track events with two different methods: by calling the `window.op('track')` directly or by adding `data-track` attributes to your HTML elements.
```html filename="index.html"
<button onclick="window.op('track', 'my_event', { foo: 'bar' })">
<button type="button" onclick="window.op('track', 'my_event', { foo: 'bar' })">
Track event
</button>
```
```html filename="index.html"
<button data-track="my_event" data-foo="bar">Track event</button>
<button type="button" data-track="my_event" data-foo="bar">Track event</button>
```
### Identifying Users

View File

@@ -1,3 +1,3 @@
{
"index": "Get started"
}
}