Skip to content

Commit

Permalink
🐛 Set wildcard referer for algolia #1944
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandolucchesi committed Oct 24, 2023
1 parent f837aee commit 68ba1b2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion web/pageComponents/pageTemplates/MagazineIndexPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const MagazineIndexPage = ({ isServerRendered = false, locale, pageData, slug, u
isServerRendered
? searchClient({
headers: {
Referer: url,
Referer: '*',
},
})
: searchClient(undefined)
Expand Down
2 changes: 1 addition & 1 deletion web/pageComponents/pageTemplates/NewsRoomPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const NewsRoomPage = ({ isServerRendered, locale, pageData, slug, url }: NewsRoo
isServerRendered
? searchClient({
headers: {
Referer: url,
Referer: '*',
},
})
: searchClient(undefined)
Expand Down
10 changes: 5 additions & 5 deletions web/pageComponents/shared/MagazineTagBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export type TagLink = {
active: boolean
} & AnchorHTMLAttributes<HTMLAnchorElement>

const StyledLink = styled(Link).attrs((props: { active: boolean }) => props)`
const StyledLink = styled(Link).attrs((props: { $active: boolean }) => props)`
display: inline-block;
position: relative;
font-weight: ${(props) => (props.active ? 'bold' : 'normal')};
font-weight: ${(props) => (props.$active ? 'bold' : 'normal')};
&:hover {
font-weight: bold;
}
Expand Down Expand Up @@ -62,7 +62,7 @@ const TagWrapper = styled.div`
::-webkit-scrollbar {
display: none;
}
@media (min-width: 1024px) {
flex-wrap: wrap;
padding: var(--space-large) var(--space-3xLarge);
Expand All @@ -86,8 +86,8 @@ const MagazineTagBar = forwardRef<HTMLDivElement, MagazineTagBarProps>(function
<Wrapper ref={ref}>
<TagWrapper>
<StyledLink
$active={allTagLink.active}
href={href}
active={allTagLink.active}
underline={false}
data-title={allTagLink.label}
onClick={(event) => {
Expand All @@ -102,10 +102,10 @@ const MagazineTagBar = forwardRef<HTMLDivElement, MagazineTagBarProps>(function
</StyledLink>
{tags.map((it: TagLink) => (
<StyledLink
$active={it.active}
underline={false}
href={`${href}${`?tag=${it.label}`}`}
key={`key_${it.label}`}
active={it.active}
data-title={it.label}
onClick={(event) => {
if (onClick) {
Expand Down

0 comments on commit 68ba1b2

Please sign in to comment.