frontend: add svelte frontend
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
export interface App {
|
||||
title: string;
|
||||
id: number;
|
||||
hdr_supported: boolean;
|
||||
}
|
||||
|
||||
export interface AppsResponse {
|
||||
apps: Record<string, App[]>;
|
||||
}
|
||||
|
||||
|
||||
export async function fetchApps() {
|
||||
console.log('Getting apps');
|
||||
const response = await fetch('/api/apps');
|
||||
console.log(response);
|
||||
const data = (await response.json()) as AppsResponse;
|
||||
console.log(data);
|
||||
return data;
|
||||
}
|
||||
Reference in New Issue
Block a user