WIP: feat(HomeView): use salix for news #118

Draft
ldragan wants to merge 1 commits from ldragan/hedera-web:taro/home-news into beta
1 changed files with 4 additions and 5 deletions
Showing only changes of commit a64a2a91f6 - Show all commits

View File

@ -1,16 +1,15 @@
<script setup>
import { ref, onMounted, inject } from 'vue';
const jApi = inject('jApi');
const api = inject('api');
const news = ref([]);
const showPreview = ref(false);
const selectedImageSrc = ref('');
const fetchData = async () => {
news.value = await jApi.query(
`SELECT title, text, image, id
FROM news
ORDER BY priority, created DESC`
);
const newsResponse = await api.get('News');
news.value = newsResponse.data;
};
const showImagePreview = src => {