Skip to content

Commit

Permalink
Merge pull request #433 from gravitational/TuukkaTahtinen/DisableBann…
Browse files Browse the repository at this point in the history
…erRevalidation

Disable banner revalidation
  • Loading branch information
TuukkaIkius authored Feb 22, 2024
2 parents 03f57f9 + 6c07c3b commit 26c9593
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/EventBanner/EventBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,17 @@ export const EventBanner: React.FC<{
initialEvent: EventProps;
}> = ({ initialEvent }) => {
const [event, setEvent] = useState<EventProps>(initialEvent);
useEffect(() => {
/* There was an excessive amount of api requests coming in to fetch the event data
so this fetch is disable until we find and fix the issue or decide to completely drop this version of the revalidation
useEffect(() => {
const fetchEvent = async () => {
const tempEvent = await fetch("/api/getfeaturedevent/").then(
(res) => res.status === 200 && res.json()
);
tempEvent && setEvent(tempEvent.data as EventProps);
};
fetchEvent();
}, []);
}, []);*/
const { sideButtons } = event;
return (
<div className={styles.banner}>
Expand Down

0 comments on commit 26c9593

Please sign in to comment.