feat: setup instagram

This commit is contained in:
Shivam Mishra
2024-12-05 15:08:37 +05:30
parent 68f02e06b7
commit 26b5c2c136
5 changed files with 260 additions and 237 deletions
@@ -1,5 +1,5 @@
<script setup>
import { computed } from 'vue';
import { ref, computed } from 'vue';
import BaseBubble from './Base.vue';
import Icon from 'next/icon/Icon.vue';
import { ATTACHMENT_TYPES } from '../constants';
@@ -29,6 +29,13 @@ const props = defineProps({
required: true,
},
});
const emit = defineEmits(['error']);
const hasError = ref(false);
const handleError = () => {
hasError.value = true;
emit('error');
};
const attachment = computed(() => {
return props.attachments[0];
@@ -54,7 +61,7 @@ const isReel = computed(() => {
'max-w-48': isReel,
'max-w-full': !isReel,
}"
@error="hasError = true"
@error="handleError"
/>
</BaseBubble>
</template>