Skip to content

Commit

Permalink
Add comments to indicate britleness of cta bar presence checks
Browse files Browse the repository at this point in the history
  • Loading branch information
brentguf committed Dec 12, 2024
1 parent 1c480de commit bb97eab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,18 @@ const ContentRight = ({
onChangeTopics,
onChangeSort,
}: Props) => {
const stickyTop = document.getElementById('project-cta-bar-top');
/*
Likely not the most reliable way to determine if the bar is present.
Context would probably be better, but this is a quick fix.
*/
const projectCTABarTop = document.getElementById('project-cta-bar-top');

return (
<Container
id="e2e-ideas-filters"
filterColumnWidth={filterColumnWidth}
top={stickyTop ? 160 : 100}
maxHeightOffset={stickyTop ? 180 : 120}
top={projectCTABarTop ? 160 : 100}
maxHeightOffset={projectCTABarTop ? 180 : 120}
gapWidth={gapWidth}
>
{/*
Expand Down
4 changes: 4 additions & 0 deletions front/app/containers/PlatformFooter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ const PlatformFooter = ({ className }: Props) => {
eventEmitter.emit('openConsentManager');
};

/*
Likely not the most reliable way to determine if the bar is present.
Context would probably be better, but this is a quick fix.
*/
const participationBar = document.getElementById('project-cta-bar-bottom');

useEffect(() => {
Expand Down

0 comments on commit bb97eab

Please sign in to comment.