23 lines
585 B
TypeScript
23 lines
585 B
TypeScript
"use client"
|
|
|
|
import { ArrowUpRight } from "lucide-react"
|
|
|
|
export function OpenAppButton() {
|
|
function openApp() {
|
|
const link = new URL("otunes://open")
|
|
link.searchParams.set("url", window.location.href)
|
|
window.location.assign(link.href)
|
|
}
|
|
|
|
return (
|
|
<button
|
|
type="button"
|
|
onClick={openApp}
|
|
className="ml-auto inline-flex shrink-0 items-center gap-1 text-sm font-medium hover:underline focus-visible:outline-2 focus-visible:outline-offset-4 md:hidden"
|
|
>
|
|
Open App
|
|
<ArrowUpRight aria-hidden className="size-4" />
|
|
</button>
|
|
)
|
|
}
|