Skip to content

Commit

Permalink
fix: fix skeletons for notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
sashtje committed Oct 13, 2023
1 parent 87bb3e1 commit e691114
Showing 1 changed file with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { memo } from 'react';

import { classNames } from '@/shared/lib/classNames';
import { VStack } from '@/shared/ui/redesigned/Stack';
import { Skeleton } from '@/shared/ui/deprecated/Skeleton';
import { Skeleton as SkeletonDeprecated } from '@/shared/ui/deprecated/Skeleton';
import { Skeleton } from '@/shared/ui/redesigned/Skeleton';
import { ToggleFeatures } from '@/shared/lib/features';

import { NotificationItem } from '../../ui/NotificationItem/NotificationItem';
import { useNotifications } from '../../api/notificationApi';
Expand All @@ -19,11 +21,23 @@ export const NotificationsList = memo((props: NotificationsListProps) => {

if (isLoading) {
return (
<VStack gap="16" max className={classNames('', {}, [className])}>
<Skeleton width="100%" borderRadius="8px" height={80} />
<Skeleton width="100%" borderRadius="8px" height={80} />
<Skeleton width="100%" borderRadius="8px" height={80} />
</VStack>
<ToggleFeatures
feature="isAppRedesigned"
on={
<VStack gap="16" max className={classNames('', {}, [className])}>
<Skeleton width="100%" borderRadius="8px" height={80} />
<Skeleton width="100%" borderRadius="8px" height={80} />
<Skeleton width="100%" borderRadius="8px" height={80} />
</VStack>
}
off={
<VStack gap="16" max className={classNames('', {}, [className])}>
<SkeletonDeprecated width="100%" borderRadius="8px" height={80} />
<SkeletonDeprecated width="100%" borderRadius="8px" height={80} />
<SkeletonDeprecated width="100%" borderRadius="8px" height={80} />
</VStack>
}
/>
);
}

Expand Down

0 comments on commit e691114

Please sign in to comment.