Skip to content

Commit

Permalink
fix: adjust styles to enable scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikmv committed Feb 2, 2025
1 parent a3df443 commit 0056994
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @flow
import React from 'react';
import type { ComponentType } from 'react';
import withStyles from '@material-ui/core/styles/withStyles';
import { compose } from 'redux';
import type { Props } from './EnrollmentPage.types';
import { enrollmentPageStatuses } from './EnrollmentPage.constants';
Expand All @@ -10,34 +9,16 @@ import { withErrorMessageHandler } from '../../../HOC';
import { MissingMessage } from './MissingMessage.component';
import { EnrollmentPageDefault } from './EnrollmentPageDefault';


const getStyles = ({ typography }) => ({
loadingMask: {
height: '100vh',
},
title: {
...typography.title,
},
});

const EnrollmentPagePlain = ({
classes,
enrollmentPageStatus,
}) => (
const EnrollmentPagePlain = ({ enrollmentPageStatus }) => (
<div data-test="enrollment-page-content">
{enrollmentPageStatus === enrollmentPageStatuses.MISSING_SELECTIONS && <MissingMessage />}

{enrollmentPageStatus === enrollmentPageStatuses.DEFAULT && <EnrollmentPageDefault />}

{enrollmentPageStatus === enrollmentPageStatuses.LOADING && (
<div className={classes.loadingMask}>
<LoadingMaskForPage />
</div>
)}
{enrollmentPageStatus === enrollmentPageStatuses.LOADING && <LoadingMaskForPage />}
</div>
);

export const EnrollmentPageComponent: ComponentType<$Diff<Props, CssClasses>> = compose(
withErrorMessageHandler(),
withStyles(getStyles),
)(EnrollmentPagePlain);
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export const TopBarActions = ({
openNewRegistrationPageWithoutProgramId ||
openSearchPage ||
openSearchPageWithoutProgramId;
const { navigate } = useNavigate();

const { navigate } = useNavigate();

const newRegistrationPage = () => {
const queryArgs = {};
Expand Down
1 change: 0 additions & 1 deletion src/core_modules/capture-core/utils/routing/useNavigate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ export const useNavigate = () => {

return { navigate };
};

0 comments on commit 0056994

Please sign in to comment.