fix: Refresh PageContainer component based on current route

This commit is contained in:
Faris Ansari 2018-11-05 15:47:26 +05:30
parent a22e16dbe3
commit 0d08da50c6

View File

@ -1,6 +1,6 @@
<template>
<div class="hub-page-container">
<component :is="current_page"></component>
<component :is="current_page.component" :key="current_page.key"></component>
</div>
</template>
@ -100,10 +100,16 @@ export default {
}
if (!route) {
return NotFound;
return {
key: 'not-found',
component: NotFound
};
}
return route_map[route];
return {
key: curr_route,
component: route_map[route]
}
}
}
}