Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [AXIMST-657] Certificates page - update condition to show header buttons #205

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/certificates/Certificates.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const MODE_COMPONENTS = {

const Certificates = ({ courseId }) => {
const {
certificates, componentMode, isLoading, loadingStatus,
certificates, componentMode, isLoading, loadingStatus, hasCertificateModes,
} = useCertificates({ courseId });

if (isLoading) {
Expand All @@ -40,7 +40,7 @@ const Certificates = ({ courseId }) => {
const ModeComponent = MODE_COMPONENTS[componentMode] || MODE_COMPONENTS[MODE_STATES.noModes];

return (
<MainLayout courseId={courseId} showHeaderButtons={certificates?.length > 0}>
<MainLayout courseId={courseId} showHeaderButtons={hasCertificateModes && certificates?.length > 0}>
<ModeComponent courseId={courseId} />
</MainLayout>
);
Expand Down
2 changes: 1 addition & 1 deletion src/certificates/hooks/useCertificates.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const useCertificates = ({ courseId }) => {
document.title = getPageHeadTitle(courseTitle, intl.formatMessage(messages.headingTitleTabText));

return {
componentMode, isLoading, loadingStatus, certificates,
componentMode, isLoading, loadingStatus, certificates, hasCertificateModes,
};
};

Expand Down
2 changes: 1 addition & 1 deletion src/textbooks/textbook-form/TextbookForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
}

.modal-preview-text {
font-size: 14px;
font-size: .875rem;
}
}

Loading