Skip to content

Commit

Permalink
refactor(core): Add memoizing
Browse files Browse the repository at this point in the history
  • Loading branch information
RitaDias committed Feb 4, 2025
1 parent 0a19384 commit d7449c7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export function ReleasesOverview() {
getTimezoneAdjustedDateTimeRange,
])

const RenderCalendarFilter = () => {
const renderCalendarFilter = useMemo(() => {
return (
<Flex flex="none">
<Card borderRight flex="none" disabled>
Expand All @@ -297,17 +297,17 @@ export function ReleasesOverview() {
</Card>
</Flex>
)
}
}, [loading, releases, releaseFilterDate, handleSelectFilterDate])

return (
<Flex direction="row" flex={1} style={{height: '100%'}}>
<Flex flex={1}>
{showCalendar && <RenderCalendarFilter />}
{showCalendar && renderCalendarFilter}
<Flex direction="column" flex={1} style={{position: 'relative'}}>
<Card flex="none" padding={3}>
<Flex align="flex-start" flex={1} gap={3}>
<Inline>
{!showCalendar && <CalendarPopover content={<RenderCalendarFilter />} />}
{!showCalendar && <CalendarPopover content={renderCalendarFilter} />}
<Stack padding={2} space={4}>
<Text as="h1" size={1} weight="semibold">
{t('overview.title')}
Expand Down

0 comments on commit d7449c7

Please sign in to comment.