refactor(media): use asset-centric storage key layout
This commit is contained in:
19
apps/admin/src/components/media/flash-query-cleanup.tsx
Normal file
19
apps/admin/src/components/media/flash-query-cleanup.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
"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
|
||||
}
|
||||
Reference in New Issue
Block a user