Skip to content

Commit

Permalink
utm_source
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbuechele committed Sep 12, 2024
1 parent 56fd45d commit f05b2de
Show file tree
Hide file tree
Showing 5 changed files with 849 additions and 677 deletions.
12 changes: 6 additions & 6 deletions app/routes/booking._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ gql`
`;

export function useUtmSource() {
const [utm_source] = useSearchParams();
const [searchParams] = useSearchParams();
if (
utm_source &&
utm_source instanceof URLSearchParams &&
utm_source.has('utm_source')
searchParams &&
searchParams instanceof URLSearchParams &&
searchParams.has('utm_source')
) {
return utm_source.get('utm_source') ?? undefined;
return searchParams.get('utm_source') ?? undefined;
}
}

Expand Down Expand Up @@ -98,7 +98,7 @@ export default function Home() {
{
applicationType: 'band',
},
{utm_source},
utm_source ? {utm_source} : undefined,
)}
/>
)}
Expand Down
7 changes: 7 additions & 0 deletions app/types/graphql.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7229,6 +7229,13 @@
}
]
},
{
"name": "oneOf",
"description": "Indicates exactly one field must be supplied and this field must not be `null`.",
"isRepeatable": false,
"locations": ["INPUT_OBJECT"],
"args": []
},
{
"name": "skip",
"description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
Expand Down
Loading

0 comments on commit f05b2de

Please sign in to comment.