Home has its own components and grid system
This commit is contained in:
22
nginx/vue/src/components/home/Feed.vue
Normal file
22
nginx/vue/src/components/home/Feed.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import axios from "axios";
|
||||
|
||||
const posts = ref([]);
|
||||
async function fetchPosts() {
|
||||
try {
|
||||
const res = await axios.get("https://adam-french.co.uk/api/posts");
|
||||
posts.value = res.data;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchPosts();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user