Skip to content

Commit

Permalink
fix: some minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasRichel committed Jun 4, 2021
1 parent a4bc877 commit b944dff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ const routes = [
}
},
{
path:
"/spaces/:spaceID(\\d+)/projects/:projectID(\\d+)/viewer/:modelIDs",
path: "/spaces/:spaceID(\\d+)/projects/:projectID(\\d+)/viewer/:modelIDs",
name: routeNames.modelViewer,
component: ModelViewer,
meta: {
Expand Down
8 changes: 5 additions & 3 deletions src/views/model-viewer/ModelViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<script>
import { merge, set } from "lodash";
import { onMounted, onUnmounted, watch } from "vue";
import { onBeforeUnmount, onMounted, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRoute } from "vue-router";
import makeBIMDataViewer from "@bimdata/viewer";
Expand Down Expand Up @@ -108,7 +108,9 @@ export default {
bimdataViewer.registerPlugin(pluginModule.default);
});
const viewer = bimdataViewer.mount("#viewer", defaultWindow);
bimdataViewer.mount("#viewer", defaultWindow);
// Keep viewer access token and locale in sync with application
unwatchAccessToken = watch(accessToken, token => {
bimdataViewer.setAccessToken(token);
});
Expand All @@ -117,7 +119,7 @@ export default {
});
});
onUnmounted(() => {
onBeforeUnmount(() => {
unwatchAccessToken();
unwatchLocale();
});
Expand Down
7 changes: 2 additions & 5 deletions src/views/project-board/ProjectBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,8 @@ export default {
},
setup() {
const { t } = useI18n();
const {
currentProject,
currentProjectUsers,
currentProjectInvitations
} = useProjects();
const { currentProject, currentProjectUsers, currentProjectInvitations } =
useProjects();
const { projectModels, loadProjectModels } = useModels();
const tabs = ref([]);
Expand Down

0 comments on commit b944dff

Please sign in to comment.