diff options
author | HampusM <hampus@hampusmat.com> | 2021-06-09 17:37:43 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-06-09 17:37:43 +0200 |
commit | 75e8ae6ebd9df23275fb14eea88da0b56d006313 (patch) | |
tree | cd8a261f856e2177626272e7018041be3102304b /packages/client/src/components/BaseErrorMessage.vue | |
parent | dae7377188242e8dbc18f029bc97b7def9acb13c (diff) |
Frontend has proper error handling & api fetching is in it's own file
Diffstat (limited to 'packages/client/src/components/BaseErrorMessage.vue')
-rw-r--r-- | packages/client/src/components/BaseErrorMessage.vue | 27 |
1 files changed, 27 insertions, 0 deletions
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> |