Skip to content

Commit

Permalink
chore: RecentlyViewed should normRef
Browse files Browse the repository at this point in the history
  • Loading branch information
stevekaplan123 committed Jan 12, 2025
1 parent 747e470 commit ea59477
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion static/js/NavSidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ const RecentlyViewedItem = ({oref}) => {
const trackItem = () => {
gtag('event', 'recently_viewed', {link_text: oref.ref, link_type: 'ref'})
}
const params = Sefaria.util.getUrlVersionsParams(oref.versions);
const url = "/" + Sefaria.normRef(oref.ref) + (params ? "?" + params : "");
return <li>
<a href={oref.ref} onClick={() => trackItem()}>{Sefaria._v({"he": oref.he_ref, "en": oref.ref})}</a>
<a href={url} onClick={() => trackItem()}>{Sefaria._v({"he": oref.he_ref, "en": oref.ref})}</a>
</li>;
}
const RecentlyViewedList = ({items}) => {
Expand Down

0 comments on commit ea59477

Please sign in to comment.