From 75e8ae6ebd9df23275fb14eea88da0b56d006313 Mon Sep 17 00:00:00 2001
From: HampusM <hampus@hampusmat.com>
Date: Wed, 9 Jun 2021 17:37:43 +0200
Subject: Frontend has proper error handling & api fetching is in it's own file

---
 .../client/src/components/BaseErrorMessage.vue     | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 packages/client/src/components/BaseErrorMessage.vue

(limited to 'packages/client/src/components/BaseErrorMessage.vue')

diff --git a/packages/client/src/components/BaseErrorMessage.vue b/packages/client/src/components/BaseErrorMessage.vue
new file mode 100644
index 0000000..7f193ce
--- /dev/null
+++ b/packages/client/src/components/BaseErrorMessage.vue
@@ -0,0 +1,27 @@
+<template>
+	<div v-if="fetchFailed" class="fs-5">
+		<span class="fetch-error-title">Error</span>
+		<p>{{ fetchFailed }}</p>
+	</div>
+</template>
+
+<script>
+export default {
+	name: "BaseErrorMessage",
+	props: {
+		fetchFailed: {
+			type: String,
+			required: true
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+@use "../scss/colors";
+
+.fetch-error-title {
+	color: colors.$danger;
+	font-weight: 700;
+}
+</style>
-- 
cgit v1.2.3-18-g5258

