Skip to content

Commit f8dca0e

Browse files
feat: add permalink facet
1 parent 66291d9 commit f8dca0e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/components/Package/TrendsChart.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,9 @@ const METRICS = computed<MetricDef[]>(() => [
588588
},
589589
])
590590
591-
const selectedMetric = shallowRef<MetricId>(DEFAULT_METRIC_ID)
591+
const selectedMetric = usePermalinkValue<MetricId>('facet', DEFAULT_METRIC_ID, {
592+
permanent: props.permalink,
593+
})
592594
593595
// Per-metric state keyed by metric id
594596
const metricStates = reactive<

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function handleModalClose() {
2828
granularity: undefined,
2929
end: undefined,
3030
start: undefined,
31+
facet: undefined,
3132
},
3233
})
3334
}

0 commit comments

Comments
 (0)