Skip to content

Commit df83d22

Browse files
refactor: migrate internal links from <a href> to <StxLink>
Convert page-to-page navigation links to StxLink for SPA navigation: - register.stx: home, terms, privacy, login links - login.stx: home, forgot-password, register links - TerritoryLeaderboard.stx: leaderboard link Anchor links (#) and placeholder links remain as <a href>. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent caed567 commit df83d22

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

resources/components/TerritoryLeaderboard.stx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ const typeLabels = {
122122

123123
<!-- View All Link -->
124124
<div class="px-4 py-3 bg-gray-50 border-t border-gray-100">
125-
<a href="/territories/leaderboard" class="text-emerald-600 font-medium text-sm hover:text-emerald-700 transition flex items-center justify-center">
125+
<StxLink to="/territories/leaderboard" class="text-emerald-600 font-medium text-sm hover:text-emerald-700 transition flex items-center justify-center">
126126
View Full Leaderboard
127127
<svg class="w-4 h-4 ml-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
128128
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
129129
</svg>
130-
</a>
130+
</StxLink>
131131
</div>
132132
</div>
133133
</template>

resources/views/login.stx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ import { defineProps, withDefaults } from 'stx'
5353
@section('content')
5454
<!-- Header -->
5555
<div class="absolute top-0 left-0 right-0 p-6">
56-
<a href="/" class="inline-flex items-center text-emerald-600 font-bold text-xl">
56+
<StxLink to="/" class="inline-flex items-center text-emerald-600 font-bold text-xl">
5757
<svg class="w-8 h-8 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
5858
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />
5959
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
6060
</svg>
6161
TrailBuddy
62-
</a>
62+
</StxLink>
6363
</div>
6464

6565
<!-- Main Content -->
@@ -128,7 +128,7 @@ import { defineProps, withDefaults } from 'stx'
128128
<input type="checkbox" id="remember" class="w-4 h-4 text-emerald-600 border-gray-300 rounded focus:ring-emerald-500" />
129129
<span class="ml-2 text-sm text-gray-600">Remember me</span>
130130
</label>
131-
<a href="/forgot-password" class="text-sm text-emerald-600 hover:text-emerald-700 font-medium">Forgot password?</a>
131+
<StxLink to="/forgot-password" class="text-sm text-emerald-600 hover:text-emerald-700 font-medium">Forgot password?</StxLink>
132132
</div>
133133

134134
<button
@@ -172,7 +172,7 @@ import { defineProps, withDefaults } from 'stx'
172172
<!-- Sign Up Link -->
173173
<p class="text-center text-sm text-gray-500 mt-8">
174174
Don't have an account?
175-
<a href="/register" class="text-emerald-600 hover:text-emerald-700 font-semibold">Sign up for free</a>
175+
<StxLink to="/register" class="text-emerald-600 hover:text-emerald-700 font-semibold">Sign up for free</StxLink>
176176
</p>
177177
</div>
178178

resources/views/register.stx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ import { defineProps, withDefaults } from 'stx'
5959
@section('content')
6060
<!-- Header -->
6161
<div class="absolute top-0 left-0 right-0 p-6">
62-
<a href="/" class="inline-flex items-center text-emerald-600 font-bold text-xl">
62+
<StxLink to="/" class="inline-flex items-center text-emerald-600 font-bold text-xl">
6363
<svg class="w-8 h-8 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
6464
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />
6565
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
6666
</svg>
6767
TrailBuddy
68-
</a>
68+
</StxLink>
6969
</div>
7070

7171
<!-- Main Content -->
@@ -164,7 +164,7 @@ import { defineProps, withDefaults } from 'stx'
164164
<div class="flex items-start">
165165
<input type="checkbox" id="terms" required class="w-4 h-4 mt-1 text-emerald-600 border-gray-300 rounded focus:ring-emerald-500" />
166166
<label for="terms" class="ml-2 text-sm text-gray-600">
167-
I agree to the <a href="/terms" class="text-emerald-600 hover:text-emerald-700">Terms of Service</a> and <a href="/privacy" class="text-emerald-600 hover:text-emerald-700">Privacy Policy</a>
167+
I agree to the <StxLink to="/terms" class="text-emerald-600 hover:text-emerald-700">Terms of Service</StxLink> and <StxLink to="/privacy" class="text-emerald-600 hover:text-emerald-700">Privacy Policy</StxLink>
168168
</label>
169169
</div>
170170

@@ -209,7 +209,7 @@ import { defineProps, withDefaults } from 'stx'
209209
<!-- Login Link -->
210210
<p class="text-center text-sm text-gray-500 mt-8">
211211
Already have an account?
212-
<a href="/login" class="text-emerald-600 hover:text-emerald-700 font-semibold">Sign in</a>
212+
<StxLink to="/login" class="text-emerald-600 hover:text-emerald-700 font-semibold">Sign in</StxLink>
213213
</p>
214214
</div>
215215
</div>

0 commit comments

Comments
 (0)