diff --git a/package.json b/package.json index 5524d9c..742ba57 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "start": "vue-cli-service build --mode other && http-server -c-1 -p 3000 ./dist" }, "dependencies": { - "@mfe-module-federation-vue/dealful-package": "^0.0.2", + "@mfe-module-federation-vue/dealful-package": "^0.0.3", "core-js": "^3.6.5", "http-server": "^0.12.3", "vue": "^2.6.11", diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index c1079ac..7c6e6c5 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -25,12 +25,11 @@ const Profile = () => import("profile/Profile"); const Logout = () => import("auth/Logout"); -import { emitter, EVENT_KEYS } from "../remotes/dealful"; -import UserTools from "auth/UserTools"; +import { emitter, EVENT_KEYS, userData } from "../dealful"; export default { name: "Navbar", - data: () => ({ drawer: null, user: UserTools.storage.userData() }), + data: () => ({ drawer: null, user: userData() }), components: { Profile, Logout }, methods: { menuToggle() { diff --git a/src/remotes/dealful.js b/src/dealful/index.js similarity index 89% rename from src/remotes/dealful.js rename to src/dealful/index.js index 128a980..640a6d4 100644 --- a/src/remotes/dealful.js +++ b/src/dealful/index.js @@ -2,4 +2,5 @@ export { emitter, EVENT_KEYS, STORAGE_KEYS, + userData, } from "@mfe-module-federation-vue/dealful-package"; diff --git a/src/router/index.js b/src/router/index.js index 7a25736..609bea7 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4,7 +4,7 @@ const Cart = () => import("cart/Cart"); const Products = () => import("products/Products"); const Login = () => import("auth/Login"); import remoteProfileRoutes from "profile/routes"; -import { STORAGE_KEYS } from "../remotes/dealful"; +import { STORAGE_KEYS } from "../dealful"; export const routes = [ { diff --git a/yarn.lock b/yarn.lock index 79e9e6f..b8ee98a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -947,10 +947,10 @@ dependencies: "@hapi/hoek" "^9.0.0" -"@mfe-module-federation-vue/dealful-package@^0.0.2": - version "0.0.2" - resolved "https://npm.pkg.github.com/download/@mfe-module-federation-vue/dealful-package/0.0.2/f9428520b663f61da550a4bacdd0551f96fcd7f82db45f9540c894772e51d129#dc111f76e428d13c007541f131783706393e796a" - integrity sha512-Yhuw/ApOGnuzpjUBV0Tp+hRQQsKa7DZ2Q98T2QEa8fT6rRo01TTHj0QC971OqVmtNFRjekQBa+f9C/yhqxRRMg== +"@mfe-module-federation-vue/dealful-package@^0.0.3": + version "0.0.3" + resolved "https://npm.pkg.github.com/download/@mfe-module-federation-vue/dealful-package/0.0.3/ad71d08efdc0bfc7b6bba26533a429823908470c0879811be872012aa92f0551#769e2d66b0d43799fd23f47138054b73802b1041" + integrity sha512-mH+IehIZau9gAMEdOG+BK2bKlZLabJ889Bh9lemyWhJr3AdAiNL0v4tv+kKwQuzlDCCWaR2S46Fdu1H7MN5KyA== dependencies: nanoevents "^6.0.0"