Added front page, moved shelf navigation to header.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user