Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Delete unused VSearchTypeRadio.vue (#1143)
Olga Bulatf234147402bf
diff --git a/frontend/src/components/VContentSwitcher/VSearchTypeRadio.vue b/frontend/src/components/VContentSwitcher/VSearchTypeRadio.vuedeleted file mode 100644index 9d86484e1..000000000--- a/frontend/src/components/VContentSwitcher/VSearchTypeRadio.vue+++ /dev/null@@ -1,69 +0,0 @@-<template>- <VButton- type="button"- variant="secondary-bordered"- size="disabled"- class="caption-bold h-10 py-2 ps-2 pe-3"- :aria-pressed="selected"- @click="handleClick"- >- <VIcon :icon-path="iconPath" class="flex-shrink-0 me-1" />- <span>{{ $t(labelMapping[searchType]) }}</span>- </VButton>-</template>--<script lang="ts">-import { computed, defineComponent, type PropType } from "vue"--import {- ALL_MEDIA,- AUDIO,- IMAGE,- type SupportedSearchType,-} from "~/constants/media"-import { defineEvent } from "~/types/emits"--import VButton from "~/components/VButton.vue"-import VIcon from "~/components/VIcon/VIcon.vue"--import audioIcon from "~/assets/icons/audio-wave.svg"-import imageIcon from "~/assets/icons/image.svg"-import allIcon from "~/assets/icons/all-content.svg"--const iconMapping = {- [AUDIO]: audioIcon,- [IMAGE]: imageIcon,- [ALL_MEDIA]: allIcon,-}-const labelMapping = {- [AUDIO]: "search-type.audio",- [IMAGE]: "search-type.image",- [ALL_MEDIA]: "search-type.all",-}--export default defineComponent({- name: "VSearchTypeRadio",- components: { VButton, VIcon },- props: {- /**- * One of the media types supported.- */- searchType: {- type: String as PropType<SupportedSearchType>,- required: true,- },- selected: {- type: Boolean,- default: false,- },- },- emits: {- select: defineEvent<[SupportedSearchType]>(),- },- setup(props, { emit }) {- const iconPath = computed(() => iconMapping[props.searchType])- const handleClick = () => emit("select", props.searchType)- return { iconPath, handleClick, labelMapping }- },-})-</script>diff --git a/frontend/tsconfig.json b/frontend/tsconfig.jsonindex 7052efed1..7c5f939c5 100644--- a/frontend/tsconfig.json+++ b/frontend/tsconfig.json@@ -75,7 +75,6 @@"src/components/VContentReport/**.vue","src/components/VContentSwitcher/VSearchTypeButton.vue","src/components/VContentSwitcher/VSearchTypeItem.vue",- "src/components/VContentSwitcher/VSearchTypeRadio.vue","src/components/VErrorSection/VErrorImage.vue","src/components/VHeader/VFilterButton.vue","src/components/VHeader/VPageLinks.vue",