Skip to content

Commit 7a511e0

Browse files
committed
add ref params
1 parent 668a057 commit 7a511e0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/features/ads/api/getAd.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { Ad } from '../types'
44
import { axios } from 'src/lib/axios'
55

66
const getAd = async (): Promise<Ad | null> => {
7-
return axios.get('/engine/ads/')
7+
let url = new URL(window.location.href);
8+
let ref = url.searchParams.get("ref");
9+
return axios.get('/engine/ads/', {params: { ref }})
810
}
911

1012
type QueryFnType = typeof getAd

0 commit comments

Comments
 (0)