Added frontend project with some basic api fetching implemented.

This commit is contained in:
2024-12-06 12:33:48 +01:00
parent cd49d32dd7
commit bab8fa6c25
20 changed files with 11147 additions and 6 deletions
+17
View File
@@ -0,0 +1,17 @@
export default function getProgress(){
const progress = ref(null as Progress | null);
fetch('http://localhost:5224/progress')
.then(response => response.json())
.then((data: Progress) => {
if (data && data.percentageOfIpv4Scanned) {
progress.value = data;
} else {
console.error("Invalid data received from API");
console.error(data);
}
});
return progress;
}