Skip to content

Commit

Permalink
fix: minHeight on loader display to avoir flik
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianRid committed Nov 19, 2024
1 parent 08c51cf commit 5264ce4
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const NotificationsAccount: React.FC<Props> = props => {
const handleNotificationsChange = async (
notifications: boolean,
notificationsFrequency: NotificationFrequency
) => {
): Promise<void> => {
await updateUser({
id: userId,
user: {
Expand All @@ -61,7 +61,7 @@ const NotificationsAccount: React.FC<Props> = props => {
{!user ||
isLoadingUser ||
(isRefetchingUser && (
<div className={fr.cx('fr-py-20v', 'fr-mt-4w')}>
<div className={classes.loaderWrapper}>
<Loader />
</div>
))}
Expand Down Expand Up @@ -140,6 +140,12 @@ const NotificationsAccount: React.FC<Props> = props => {
};

const useStyles = tss.withName(NotificationsAccount.name).create({
loaderWrapper: {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
minHeight: '100vh'
},
headerWrapper: {
display: 'flex',
alignItems: 'center',
Expand Down

0 comments on commit 5264ce4

Please sign in to comment.