MCPcopy Create free account
hub / github.com/vercel/examples / DevTools

Function DevTools

flags-sdk/vercel/components/dev-tools.tsx:6–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { useRouter } from 'next/navigation'
5
6export function DevTools() {
7 const router = useRouter()
8
9 const deleteCookie = () => {
10 document.cookie =
11 'stable-id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'
12 router.refresh()
13 }
14
15 return (
16 <div className="fixed bottom-2 right-2 p-3 bg-[#333333] rounded shadow-lg z-50 flex flex-col gap-2">
17 <span className="text-white font-mono text-xs">Dev Tools</span>
18 <button
19 type="button"
20 className="bg-white text-black font-mono text-xs rounded px-2 py-1 flex items-center gap-2 cursor-pointer hover:bg-gray-200 transition-colors active:bg-gray-300"
21 onClick={deleteCookie}
22 >
23 <ArrowPathIcon className="w-4 h-4" />
24 Reset Stable ID
25 </button>
26 </div>
27 )
28}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected