Binary file uploads and missing workspace empty state

This commit is contained in:
Gregory Schier
2024-03-10 10:56:38 -07:00
parent 8d2a2a8532
commit d726a6f5bf
27 changed files with 214 additions and 47 deletions

View File

@@ -0,0 +1,9 @@
import { useMemo } from 'react';
import type { HttpHeader } from '../lib/models';
export function useContentTypeFromHeaders(headers: HttpHeader[] | null): string | null {
return useMemo(
() => headers?.find((h) => h.name.toLowerCase() === 'content-type')?.value ?? null,
[headers],
);
}