diff --git a/src/app.config.ts b/src/app.config.ts index 18d9e16..91abebf 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -19,7 +19,10 @@ export default defineAppConfig({ }, }, button: { - base: 'duration-300 focus:outline-none focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-75 flex-shrink-0', + base: 'duration-300 focus:outline-none focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-75', }, + popover: { + container: "z-30", + } }, }) diff --git a/src/composables/useTalents.ts b/src/composables/useTalents.ts index 28ebb78..7dff82b 100644 --- a/src/composables/useTalents.ts +++ b/src/composables/useTalents.ts @@ -20,6 +20,10 @@ export async function useTalents() { await refreshTalents() } + function isCategory(category: string) { + return getCategory.value === category + } + const { data: getCategories, } = await $trpc.talents.getCategories.useQuery() @@ -31,5 +35,6 @@ export async function useTalents() { switchCategory, toggleFavorite, pending, + isCategory, } } diff --git a/src/pages/talents.vue b/src/pages/talents.vue index 2c0116a..30c0ae2 100644 --- a/src/pages/talents.vue +++ b/src/pages/talents.vue @@ -4,7 +4,7 @@ useHead({ }) const categories = ref>([{ label: 'All', slug: 'all' }]) -const { getCategories, talents, isFavorite, toggleFavorite, switchCategory, pending } = await useTalents() +const { getCategories, talents, isFavorite, toggleFavorite, switchCategory, pending, isCategory } = await useTalents() getCategories.value?.forEach(category => categories.value.push({ label: category.name, slug: category.slug })) @@ -40,17 +40,26 @@ function getColor() { -
-
- - - +
+
+
+ All +
+
+

+ {{ category.name }} +

+
-
+
@@ -130,3 +139,12 @@ function getColor() {
+ +