Files
BRETT/app/composables/useLastViewedUpload.ts
T
2026-10-03 20:07:49 +02:00

18 lines
571 B
TypeScript

export function useLastViewedUpload() {
return useState<string | null>('last-viewed-upload', () => null)
}
export interface PendingUploadMedia {
id: string
type: 'image' | 'video' | 'audio' | 'youtube' | 'twitch' | 'link'
url: string | null
thumbUrl: string | null
}
// Beim Tile-Klick schon bekannte Mediendaten, damit die Thread-Seite
// vor Eintreffen der API-Antwort ein benanntes Element für die
// View-Transition rendern kann
export function usePendingUploadMedia() {
return useState<PendingUploadMedia | null>('pending-upload-media', () => null)
}