The frontend for the project formerly known as signet, now known as beignet.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

51 rader
1.1 KiB

  1. <template>
  2. <div>
  3. <section class="layout-section">
  4. <div class="container-grid" v-if="rewardFunds">
  5. <template v-for="fund in rewardFunds" :key="fund.id">
  6. <RouterLink :to="`/fund/${fund.id}`">
  7. <FundLink :fund="fund"/>
  8. </RouterLink>
  9. </template>
  10. </div>
  11. <div v-else>
  12. <div class="has-text-centered is-size-4">
  13. No group funds yet!
  14. </div>
  15. </div>
  16. </section>
  17. </div>
  18. </template>
  19. <script setup lang="ts">
  20. import { ref } from 'vue';
  21. import FundLink from '@/components/FundLink.vue';
  22. import { getRewardFunds } from '@/api/composed';
  23. const offset = ref(0);
  24. const response = await getRewardFunds(offset.value);
  25. if (!response) throw new Error('Could not get reward funds');
  26. const {
  27. total,
  28. rewardFunds,
  29. } = response;
  30. offset.value = total;
  31. </script>
  32. <style scoped lang="stylus">
  33. .container-grid
  34. display grid
  35. grid-template-columns: repeat(2, 1fr)
  36. gap: 10px
  37. grid-auto-rows: 120px
  38. a
  39. text-decoration none
  40. @media screen and (max-width: 680px)
  41. .container-grid
  42. display flex
  43. flex-direction column
  44. </style>