forked from BRETT/BRETT
18 lines
571 B
TypeScript
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)
|
|
}
|