ContextPath added to dynamic urls and services

This commit is contained in:
Bahadır Sofuoğlu
2022-11-29 13:46:18 +03:00
parent 93ec659282
commit bbcebb99c5
21 changed files with 115 additions and 226 deletions

View File

@@ -1,5 +1,8 @@
<script setup>
import { ref, onMounted, computed } from 'vue';
import { useLayout } from '@/layout/composables/layout';
const { contextPath } = useLayout();
const icons = ref(null);
const filter = ref(null);
@@ -10,7 +13,7 @@ const filteredIcons = computed(() => {
});
onMounted(() => {
fetch('data/icons.json', { headers: { 'Cache-Control': 'no-cache' } })
fetch(contextPath + 'data/icons.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => {
let icons = d.icons;