-
-
Notifications
You must be signed in to change notification settings - Fork 433
refactor: use object-syntax/named routes #1041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
bfc5a57
b6d27e2
e819407
5a17966
1d8e02f
b127c62
ea9a401
ddb61e9
3cc2025
32f13fb
1657bff
4690b1a
2c15c09
ccf60bc
7decbcd
3e69d3e
36610fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,7 @@ onKeyDown( | |
| return | ||
| } | ||
|
|
||
| router.push('/search') | ||
| router.push({ name: 'search' }) | ||
| }, | ||
| { dedupe: true }, | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,7 +106,10 @@ const allMaintainersText = computed(() => { | |
| :key="maintainer.username || maintainer.email" | ||
| > | ||
| <NuxtLink | ||
| :to="`/~${maintainer.username || maintainer.name}`" | ||
| :to="{ | ||
| name: '~username', | ||
| params: { username: maintainer.username || maintainer.name || '' }, | ||
| }" | ||
|
Comment on lines
+109
to
+112
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# First, let's find and examine the TableRow.vue file to see the full context
fd -t f "TableRow.vue"Repository: npmx-dev/npmx.dev Length of output: 96 🏁 Script executed: #!/bin/bash
# Search for maintainer type definitions in the codebase
rg -t ts -t tsx "type.*[Mm]aintainer|interface.*[Mm]aintainer" -A 5Repository: npmx-dev/npmx.dev Length of output: 88 🏁 Script executed: #!/bin/bash
# Look for npm-registry related type definitions that might define Maintainer
fd -t f -e ts -e tsx | xargs grep -l "maintainer\|Maintainer" | head -20Repository: npmx-dev/npmx.dev Length of output: 585 🏁 Script executed: #!/bin/bash
# Read the npm-registry types file
cat shared/types/npm-registry.tsRepository: npmx-dev/npmx.dev Length of output: 9637 🏁 Script executed: #!/bin/bash
# Check the size and then read TableRow.vue
wc -l app/components/Package/TableRow.vueRepository: npmx-dev/npmx.dev Length of output: 100 🏁 Script executed: #!/bin/bash
# Read TableRow.vue to see the full context around lines 109-112
cat -n app/components/Package/TableRow.vueRepository: npmx-dev/npmx.dev Length of output: 7783 Guard against empty maintainer route parameters. Lines 109–112 can pass 🔧 Proposed fix <NuxtLink
+ v-if="maintainer.username || maintainer.name"
:to="{
name: '~username',
- params: { username: maintainer.username || maintainer.name || '' },
+ params: { username: maintainer.username || maintainer.name },
}"
class="hover:text-accent-fallback transition-colors duration-200"
`@click.stop`
- >{{ maintainer.username || maintainer.name || maintainer.email }}</NuxtLink
+ >{{ maintainer.username || maintainer.name }}</NuxtLink
><span v-if="idx < Math.min(pkg.maintainers.length, 3) - 1">, </span>
+ <span v-else class="text-fg-subtle">{{ maintainer.email }}</span> |
||
| class="hover:text-accent-fallback transition-colors duration-200" | ||
| @click.stop | ||
| >{{ maintainer.username || maintainer.name || maintainer.email }}</NuxtLink | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.