Files
old.cms.fellies.org/apps/admin/src/components/media/flash-query-cleanup.tsx

20 lines
337 B
TypeScript

"use client"
import { useEffect } from "react"
type FlashQueryCleanupProps = {
enabled: boolean
}
export function FlashQueryCleanup({ enabled }: FlashQueryCleanupProps) {
useEffect(() => {
if (!enabled) {
return
}
window.history.replaceState(window.history.state, "", "/media")
}, [enabled])
return null
}