Skip to content

Commit fc64ccb

Browse files
committed
refactor: rename function
1 parent 12d4656 commit fc64ccb

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const breadcrumbs = computed(() => {
201201
})
202202
203203
// Navigation helper - build URL for a path
204-
function getCurrentCodeUrl(path?: string): string {
204+
function getCurrentCodeUrlWithPath(path?: string): string {
205205
return getCodeUrl({
206206
...route.params,
207207
filePath: path,
@@ -249,7 +249,7 @@ function copyPermalinkUrl() {
249249
}
250250
251251
// Canonical URL for this code page
252-
const canonicalUrl = computed(() => `https://npmx.dev${getCurrentCodeUrl()}`)
252+
const canonicalUrl = computed(() => `https://npmx.dev${getCurrentCodeUrlWithPath()}`)
253253
254254
// Toggle markdown view mode
255255
const markdownViewModes = [
@@ -349,7 +349,7 @@ defineOgImageComponent('Default', {
349349
>
350350
<NuxtLink
351351
v-if="filePath"
352-
:to="getCurrentCodeUrl()"
352+
:to="getCurrentCodeUrlWithPath()"
353353
class="text-fg-muted hover:text-fg transition-colors shrink-0"
354354
>
355355
{{ $t('code.root') }}
@@ -359,7 +359,7 @@ defineOgImageComponent('Default', {
359359
<span class="text-fg-subtle">/</span>
360360
<NuxtLink
361361
v-if="i < breadcrumbs.length - 1"
362-
:to="getCurrentCodeUrl(crumb.path)"
362+
:to="getCurrentCodeUrlWithPath(crumb.path)"
363363
class="text-fg-muted hover:text-fg transition-colors"
364364
>
365365
{{ crumb.name }}
@@ -401,7 +401,7 @@ defineOgImageComponent('Default', {
401401
<CodeFileTree
402402
:tree="fileTree.tree"
403403
:current-path="filePath ?? ''"
404-
:base-url="getCurrentCodeUrl()"
404+
:base-url="getCurrentCodeUrlWithPath()"
405405
:base-route="route"
406406
/>
407407
</aside>
@@ -557,7 +557,7 @@ defineOgImageComponent('Default', {
557557
<CodeDirectoryListing
558558
:tree="fileTree.tree"
559559
:current-path="filePath ?? ''"
560-
:base-url="getCurrentCodeUrl()"
560+
:base-url="getCurrentCodeUrlWithPath()"
561561
:base-route="route"
562562
/>
563563
</template>
@@ -571,7 +571,7 @@ defineOgImageComponent('Default', {
571571
v-if="fileTree"
572572
:tree="fileTree.tree"
573573
:current-path="filePath ?? ''"
574-
:base-url="getCurrentCodeUrl()"
574+
:base-url="getCurrentCodeUrlWithPath()"
575575
:base-route="route"
576576
/>
577577
</Teleport>

0 commit comments

Comments
 (0)