diff --git a/zimui/src/components/ErrorDisplay.vue b/zimui/src/components/ErrorDisplay.vue new file mode 100644 index 0000000..57d8337 --- /dev/null +++ b/zimui/src/components/ErrorDisplay.vue @@ -0,0 +1,32 @@ + + + + + + {{ main.errorMessage }} + + + + diff --git a/zimui/src/components/TopicHome.vue b/zimui/src/components/TopicHome.vue index 343f776..89d226c 100644 --- a/zimui/src/components/TopicHome.vue +++ b/zimui/src/components/TopicHome.vue @@ -8,9 +8,8 @@ import TopicSectionType from '@/types/TopicSection' import { transformTopicSectionOrSubSectionToCardData } from '@/types/TopicCardData' import ToolBar from '../components/ToolBar.vue' import { useLoading } from 'vue-loading-overlay' -import errimageData from '../assets/Error.jpg' +import ErrorDisplay from './ErrorDisplay.vue' -const errimage = ref(errimageData) const main = useMainStore() const props = defineProps({ @@ -24,7 +23,6 @@ const topic = ref() const dataLoaded = ref(false) const $loading = useLoading() - /** Retrieve topic data */ const fetchData = async function () { const loader = $loading.show({ @@ -93,9 +91,8 @@ const goToPreviousPage = () => { - - - {{ main.errorMessage }} + + { footer { text-align: center; } - -.error-container { - text-align: center; - padding: 20px; -} - -.error-image { - width: 300px; - margin-bottom: 20px; -} - -.error-text { - color: black; /* Black text color */ - font-size: 16px; -} - - diff --git a/zimui/src/pages/HomePage.vue b/zimui/src/pages/HomePage.vue index 859ca53..d15db8f 100644 --- a/zimui/src/pages/HomePage.vue +++ b/zimui/src/pages/HomePage.vue @@ -1,9 +1,6 @@ - - - {{ main.errorMessage }} + + @@ -47,19 +44,4 @@ import TopicHome from '../components/TopicHome.vue' - +
{{ main.errorMessage }}