Skip to content

Commit

Permalink
fix: 충돌나서 수정중 #24
Browse files Browse the repository at this point in the history
  • Loading branch information
swy0123 committed May 25, 2023
1 parent cc51999 commit 0067105
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
20 changes: 9 additions & 11 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ import CommonFooter from "./components/common/CommonFooter.vue";
import ConfirmHeader from "./components/common/ConfirmHeader.vue";
import WordCloud from "@/components/common/WordCloud.vue";
import RealRadarChartGraph from "@/components/common/RealRadarChartGraph.vue";
import { mapState, mapActions } from "vuex";
const routerStore = "routerStore";
export default {
components: {
Expand All @@ -65,16 +63,16 @@ export default {
VueScrollSnap,
},
created() {
this.setOnBoard(localStorage.getItem("isOnBoard"));
console.log("fullscreen");
},
computed: {
...mapState(routerStore, ["isOnBoard"]),
},
methods: {
...mapActions(routerStore, ["setOnBoard"]),
},
};
const isOnBoard = localStorage.getItem('isOnBoard');
if (isOnBoard === null) {
this.setOnBoard(true);
} else {
this.setOnBoard(isOnBoard === 'true');
}
}
}
</script>

<style scoped>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/ConfirmHeader.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<header :class="{'custom-header-onboard': isOnBoard, 'custom-header': !isOnBoard}">
<b-navbar type="dark">
<b-navbar-brand @click="updateOnBoard(true)" to="/tmp">
<b-navbar-brand @click="updateOnBoard(true)" to="/">
<img src="@/assets/common/logo_white.png" style="max-width: 100px; max-height: 60px; padding-left: 20px;" class="mr-2" />
</b-navbar-brand>
<b-nav class="ml-auto">
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

import store from "@/store";
import BlankView from "@/views/BlankView.vue";

Vue.use(VueRouter);

Expand All @@ -23,6 +24,11 @@ const onlyAuthUser = async (to, from, next) => {
};

const routes = [
{
path: "/",
name: "blank",
component: BlankView,
},
{
path: "/home",
name: "home",
Expand Down Expand Up @@ -206,7 +212,7 @@ const router = new VueRouter({
});

router.beforeEach((to, from, next) => {
store.dispatch('routerStore/setOnBoard', false); // 링크 클릭 시 setOnBoard 액션을 호출하여 false 값을 전달한다.
store.dispatch('routerStore/setOnBoard', false);
next();
});

Expand Down
23 changes: 23 additions & 0 deletions frontend/src/views/BlankView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<div>

</div>
</template>

<script>
import { mapState, mapActions } from "vuex";
const routerStore = "routerStore";
export default {
name: "BlackView",
computed: {
...mapState(routerStore, ["isOnBoard"]),
},
methods: {
...mapActions(routerStore, ["setOnBoard"]),
},
created() {
this.setOnBoard(true);
}
};
</script>

0 comments on commit 0067105

Please sign in to comment.