Skip to content

Commit 1ef63f5

Browse files
refactor: remove unnecessary focus logic
1 parent 215db77 commit 1ef63f5

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

app/pages/index.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<script setup lang="ts">
22
const router = useRouter()
33
const searchQuery = ref('')
4-
const searchInputRef = useTemplateRef('searchInputRef')
5-
const { focused: isSearchFocused } = useFocus(searchInputRef)
64
7-
function handleSearch() {
5+
function handleSubmit() {
86
router.push({
97
name: 'search',
108
query: {
@@ -44,13 +42,12 @@ defineOgImageComponent('Default')
4442
class="w-full max-w-xl motion-safe:animate-slide-up motion-safe:animate-fill-both"
4543
style="animation-delay: 0.2s"
4644
>
47-
<form method="GET" action="/search" class="relative" @submit.prevent="handleSearch">
45+
<form method="GET" action="/search" class="relative" @submit.prevent="handleSubmit">
4846
<label for="home-search" class="sr-only">
4947
{{ $t('search.label') }}
5048
</label>
5149

52-
<!-- Search input with glow effect on focus -->
53-
<div class="relative group" :class="{ 'is-focused': isSearchFocused }">
50+
<div class="relative group">
5451
<!-- Subtle glow effect -->
5552
<div
5653
class="absolute -inset-px rounded-lg bg-gradient-to-r from-fg/0 via-fg/5 to-fg/0 opacity-0 transition-opacity duration-500 blur-sm group-[.is-focused]:opacity-100"

0 commit comments

Comments
 (0)