We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cdc0593 commit 1dc0e65Copy full SHA for 1dc0e65
src/components/meta.jsx
@@ -1,7 +1,6 @@
1
import Head from 'next/head'
2
-import Script from 'next/script'
3
-import { usePathname, useSearchParams } from "next/navigation"
4
-import * as Swetrix from "swetrix"
+import { usePathname, useSearchParams } from 'next/navigation'
+import * as Swetrix from 'swetrix'
5
6
const Meta = () => {
7
const pathname = usePathname()
@@ -12,11 +11,11 @@ const Meta = () => {
12
11
apiURL: process.env.NEXT_PUBLIC_SWETRIX_API_HOST,
13
})
14
let url = pathname
15
- if (searchParams.toString() !== "") {
+ if (searchParams.toString() !== '') {
16
url += `?${searchParams.toString()}`
17
}
18
19
- if (typeof document !== "undefined") {
+ if (typeof document !== 'undefined') {
20
Swetrix.trackPageview(url)
21
22
0 commit comments