<script setup>
import { buildTrackRoute } from '~/utils/public-routes'

const route = useRoute()
const { locale } = usePublicLocale()
const token = computed(() => String(route.params.token || '').trim())

await navigateTo(
  buildTrackRoute(token.value, route.query, {
    locale: locale.value,
  }),
  { replace: true },
)
</script>
