-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Events - Fixing events performance (#3274)
* Events - Removing the search Param * Removing reducer * removing redundant code * removing unused reducer import * Adding placeholder image for the events * Adding lazy loading for the images * adding minimum height for the timing * Adding query param feature * Adding breadcrumb * fixing mobile view * removing query param * Adding bluredBase 64 image * removing unused func * Adding the blurred image for the events * fixing the image import path * Adding search param for client rendering * Adding some spaces for mobile view on relative timings * removing unused placeholder image * Updating the comment
- Loading branch information
1 parent
4917ee7
commit 7cf6c7d
Showing
9 changed files
with
95 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import { Container } from "@/components/util/container"; | ||
|
||
export default function Loading() { | ||
const Loading = () => ( | ||
<Container className="flex justify-center" width="large" size="custom"> | ||
<h1>Loading...</h1> | ||
</Container>; | ||
} | ||
</Container> | ||
); | ||
|
||
export default Loading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export const getTrimmedEvent = (events) => | ||
events?.pages.flat().flatMap((item) => | ||
item.eventsCalendarConnection.edges.map((edge) => ({ | ||
...edge.node, | ||
startDateTime: new Date(edge.node.startDateTime), | ||
endDateTime: new Date(edge.node.endDateTime), | ||
category: formatCategory(edge.node.category), | ||
})) | ||
) || []; | ||
|
||
export const formatCategory = (category: string): string => { | ||
{ | ||
const categoryReplacements = { | ||
"Non-English Courses": "Other", | ||
}; | ||
const lookup = categoryReplacements[category]; | ||
|
||
return lookup ? lookup : category; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters