Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21778,6 +21778,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var swrv__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swrv */ "./node_modules/swrv/esm/index.js");
/* harmony import */ var _utils_functions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/functions */ "./resources/js/utils/functions.js");



/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
Expand All @@ -21802,6 +21804,9 @@ __webpack_require__.r(__webpack_exports__);
ref: vue__WEBPACK_IMPORTED_MODULE_0__.ref,
get useSWRV() {
return swrv__WEBPACK_IMPORTED_MODULE_1__["default"];
},
get formatPrice() {
return _utils_functions__WEBPACK_IMPORTED_MODULE_2__["default"];
}
};
Object.defineProperty(__returned__, '__isScriptSetup', {
Expand Down Expand Up @@ -22767,7 +22772,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
}, null, 8 /* PROPS */, _hoisted_6)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
"class": "product__title",
title: product.name
}, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(product.name), 9 /* TEXT, PROPS */, _hoisted_9)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_11, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(product.price) + ",- ", 1 /* TEXT */)])])])];
}, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(product.name), 9 /* TEXT, PROPS */, _hoisted_9)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_11, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($setup.formatPrice(product.price)), 1 /* TEXT */)])])])];
}),

_: 2 /* DYNAMIC */
Expand Down
4 changes: 3 additions & 1 deletion resources/js/components/Header/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>
<div class="mt-4">
<div class="product__price">
{{ product.price }},-
{{ formatPrice(product.price) }}
</div>
</div>
</div>
Expand All @@ -42,6 +42,8 @@
import { ref } from "vue";
import useSWRV from "swrv";

import formatPrice from "../../utils/functions";

const fetcher = (key) => fetch(key).then((res) => res.json());

const searchTerm = ref("");
Expand Down