Skip to content

Commit

Permalink
fix: Revert lazy loading notifications dropdown (#14947)
Browse files Browse the repository at this point in the history
  • Loading branch information
olerichter00 authored Dec 5, 2024
1 parent 3e72914 commit 5c43f84
Showing 1 changed file with 6 additions and 25 deletions.
31 changes: 6 additions & 25 deletions src/Components/NavBar/Menus/NavBarNotifications.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
import { Box, Flex, Spinner } from "@artsy/palette"
import loadable from "@loadable/component"

const Notifications = loadable(
() =>
import(
/* webpackChunkName: "notificationsBundle" */
"Components/Notifications/Notifications"
),
{ resolveComponent: component => component.Notifications }
)
import { Box } from "@artsy/palette"
import { Notifications } from "Components/Notifications/Notifications"

interface NavBarNotificationsProps {
unreadCounts: number
onHide: () => void
}

export const NavBarNotifications: React.FC<React.PropsWithChildren<NavBarNotificationsProps>> = ({
onHide,
...rest
}) => {
export const NavBarNotifications: React.FC<React.PropsWithChildren<
NavBarNotificationsProps
>> = ({ onHide, ...rest }) => {
return (
<Box width={420}>
<Notifications
mode="dropdown"
fallback={
<Flex height={600}>
<Spinner m="auto" />
</Flex>
}
onHide={onHide}
{...rest}
/>
<Notifications mode="dropdown" onHide={onHide} {...rest} />
</Box>
)
}

0 comments on commit 5c43f84

Please sign in to comment.