Added front page, moved shelf navigation to header.

This commit is contained in:
2023-06-25 23:50:08 +02:00
parent 77085c5755
commit b3e5769d39
27 changed files with 554 additions and 109 deletions

View File

@@ -4,7 +4,7 @@
@submit.prevent="addComment"
>
<textarea
ref="input"
ref="inputRef"
v-model="body"
placeholder="Write a new comment"
class="input"
@@ -44,7 +44,7 @@ const props = defineProps({
});
const body = ref('');
const input = ref(null);
const inputRef = ref(null);
async function addComment() {
await api.post(`/posts/${props.post.id}/comments`, {
@@ -57,7 +57,7 @@ async function addComment() {
onMounted(() => {
if (props.comment) {
input.value.focus();
inputRef.value.focus();
}
});
</script>