Skip to content

Commit

Permalink
fix(ui): fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sentriz committed May 14, 2021
1 parent 60f2c7a commit 25dfd0e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions frontend/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export type MediaType = 'image' | 'video'
export interface Media {
id: number
type: MediaType
mime: string
hash: string
timestamp: any
dim_width: number
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/MediaHighlight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</template>
<script setup lang="ts">
import { defineProps, computed } from 'vue'
import { defineProps, computed, defineEmit } from 'vue'
import { urlMedia } from '../api'
import useStore from '../composables/useStore'
Expand All @@ -32,7 +32,7 @@ const props = defineProps<{
}>()
const emit = defineEmit<(e: string) => void>()
const loaded = emit('loaded')
const loaded = () => emit('loaded')
const store = useStore()
Expand Down
6 changes: 2 additions & 4 deletions frontend/components/Public.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ import LoadingSpinner from './LoadingSpinner.vue'
import { ref, computed, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { urlMedia, newSocket } from '../api'
import { newSocket } from '../api'
import useStore from '../composables/useStore'
const store = useStore()
const route = useRoute()
const hash = (route.params.hash as string) || ''
const mediaHave = ref(false)
const mediaLoaded = (_: Event) => {
mediaHave.value = true
}
const mediaLoaded = () => mediaHave.value = true
const media = computed(() => store.getMediaByHash(hash))
const blocks = computed(() => store.getBlocksByHash(hash))
Expand Down

0 comments on commit 25dfd0e

Please sign in to comment.