()
| 4 | import { useRouter } from 'next/navigation' |
| 5 | |
| 6 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected