Skip to content

Commit

Permalink
Rename check UTM params.
Browse files Browse the repository at this point in the history
  • Loading branch information
sherakama committed Oct 22, 2024
1 parent 4d7c541 commit cc85ead
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/search/Hits/SearchResultAlumniEvent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CalendarIcon, LocationMarkerIcon } from '@heroicons/react/outline';
import { Heading } from '../../simple/Heading';
import HeroIcon from '../../simple/heroIcon';
import { utmParams } from '../../../utilities/utmParams';
import { checkParams } from '../../../utilities/checkParams';
import { checkUTMParams } from '../../../utilities/checkUTMParams';
import { SrOnlyText } from '../../accessibility/SrOnlyText';

/**
Expand Down Expand Up @@ -74,7 +74,7 @@ const SearchResultAlumniEvent = ({ result }) => {
<Heading level={3} size={1} font="serif">
<a
className="su-text-digital-red-light su-group su-transition-colors hocus:su-underline"
href={checkParams(url, utms)}
href={checkUTMParams(url, utms)}
>
<span
// eslint-disable-next-line react/no-danger
Expand Down
4 changes: 2 additions & 2 deletions src/components/search/Hits/SearchResultDefault.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useLocation } from '@reach/router';
import { Heading } from '../../simple/Heading';
import HeroIcon from '../../simple/heroIcon';
import { utmParams } from '../../../utilities/utmParams';
import { checkParams } from '../../../utilities/checkParams';
import { checkUTMParams } from '../../../utilities/checkUTMParams';
import { decodeHtmlEntities } from '../../../utilities/decodeHtmlEntities';
/**
* Default {Hit}
Expand All @@ -30,7 +30,7 @@ const SearchResultDefault = ({ result }) => {
<Heading level={3} size={1} font="serif">
<a
className="su-text-digital-red-light su-group su-transition-colors hocus:su-underline"
href={checkParams(url, utms)}
href={checkUTMParams(url, utms)}
>
{fileType === 'video' && (
<HeroIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @param {*} utms
* @returns
*/
export const checkParams = (url, utms) => {
export const checkUTMParams = (url, utms) => {
let linkUrl = url;
if (linkUrl.match(/\?/) && utms.length) {
linkUrl += `&${utms}`;
Expand Down

0 comments on commit cc85ead

Please sign in to comment.