diff --git a/routes/api/cart.js b/routes/api/cart.js index 1791e02..b2cde8a 100644 --- a/routes/api/cart.js +++ b/routes/api/cart.js @@ -17,7 +17,7 @@ const getPrice = require("../../helpers/getPrice"); router.get("/:symbol", ensureAuth, async (req, res) => { const symbol = req.params.symbol; const price = await getPrice(symbol); - res.status(200).render("cart", { layout: "layouts/app", symbol, price }); + res.status(200).render("cart", { layout: "layouts/app", symbol, price, href: '/market' }); }); // @desc To buy diff --git a/routes/api/market.js b/routes/api/market.js index cb2e011..a59308d 100644 --- a/routes/api/market.js +++ b/routes/api/market.js @@ -15,7 +15,7 @@ const { ensureAuth, ensureGuest } = require("../../middleware/auth"); // @route GET /Market // @access Private router.get("/", ensureAuth, async (req, res) => { - res.status(200).render("market", { layout: "layouts/app", jsonData }); + res.status(200).render("market", { layout: "layouts/app", jsonData, href: '/market' }); }); - + module.exports = router; diff --git a/routes/api/portfolio.js b/routes/api/portfolio.js index fe03bee..8aaaab7 100644 --- a/routes/api/portfolio.js +++ b/routes/api/portfolio.js @@ -9,7 +9,7 @@ const { ensureAuth, ensureGuest } = require("../../middleware/auth"); // @access Private router.get("/", ensureAuth, (req, res) => { let avatar = req.user.image; - res.status(200).render("portfolio", { layout: "layouts/app", avatar }); + res.status(200).render("portfolio", { layout: "layouts/app", avatar, href: '/portfolio' }); }); module.exports = router; diff --git a/views/layouts/app.ejs b/views/layouts/app.ejs index 0167166..730530a 100644 --- a/views/layouts/app.ejs +++ b/views/layouts/app.ejs @@ -19,7 +19,7 @@
-