Skip to content

Commit

Permalink
usePage: clean up imports, set alias for h3 getRequestUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
dm-heinze committed Sep 29, 2023
1 parent eed90cb commit 8345cd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/platforms/shopware/composables/usePage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Ref, ref } from 'vue'
import { RouteLocationNormalizedLoaded } from 'vue-router'
import { joinURL } from 'ufo'
import { getRequestURL as h3GetRequestUrl } from 'h3'
import { useRouter, useRuntimeConfig } from '#app'
import {
HblIUsePage,
Expand All @@ -19,7 +21,6 @@ import {
import { request as __request } from '@hubblecommerce/hubble/platforms/shopware/request'
import { useLocalisation, hblMapPage, hblMapProductListing, hblMapProduct } from '#imports'
import { useRequestEvent } from '#app/composables/ssr'
import { joinURL } from 'ufo'

const associations = {
media: {},
Expand All @@ -32,7 +33,7 @@ const associations = {

export function getRequestURL () {
if (process.server) {
const url: any = getRequestURL(useRequestEvent())
const url: any = h3GetRequestUrl(useRequestEvent())
url.pathname = joinURL(useRuntimeConfig().app.baseURL, url.pathname)
return url
}
Expand Down

0 comments on commit 8345cd7

Please sign in to comment.