Ignore:
Timestamp:
01/26/25 21:03:40 (3 months ago)
Author:
Aleksandarj03 <138524804+Aleksandarj03@…>
Branches:
master
Children:
840887f
Parents:
231918f
Message:

Ne rabote fetcho

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ReserveNGo-frontend/src/components/Project/favourite_locals.vue

    r231918f rc3d3266  
    1 <script setup>
    2 import Locale_ from '@/components/Project/Locale_.vue'
     1<script>
     2import { userStore } from '@/PiniaStores/UserStore.js'
     3export default {
     4  data() {
     5    return {
     6      locals:[],
     7      userStore_:userStore(),
     8    }
     9  },
     10  beforeMount() {
     11     fetch(`http://localhost:8080/api/customer/favourite-locals`,{
     12      method: 'GET',
     13      headers: {
     14        'Authorization': this.userStore_.getToken
     15      }
     16    })
     17      .then(res => res.json())
     18      .then(data => this.locals = data)
     19      .catch(err => console.log(err))
     20  },
     21}
    322</script>
    423
    524<template>
    6 
    7   <div id="container " class="border container-xxl">
    8 
    9     <locale_/>
    10     <locale_/>
    11     <locale_/>
    12     <locale_/>
    13     <locale_/>
    14 
     25  <div id="container " class="border container-xxl" v-for="local in locals" :key="local">
     26    <h3>{{local.name}}</h3>
     27    <h3>{{local.address}}</h3>
    1528  </div>
    16 
    1729</template>
    1830
    19 <style scoped>
    20 
    21 </style>
     31<style scoped></style>
Note: See TracChangeset for help on using the changeset viewer.