Skip to content

Commit

Permalink
fix: Fixed some UX issues with academies pages. (#892)
Browse files Browse the repository at this point in the history
  • Loading branch information
saleem-latif authored Dec 11, 2023
1 parent 6a53e66 commit 1a795a0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/academies/SearchAcademyCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {
import PropTypes from 'prop-types';
import { AppContext } from '@edx/frontend-platform/react';

import './styles/Academy.scss';

const SearchAcademyCard = ({
uuid, title, shortDescription, image, isLoading,
}) => {
Expand All @@ -15,14 +17,17 @@ const SearchAcademyCard = ({
isClickable
as={Hyperlink}
isLoading={isLoading}
destination={`/${enterpriseConfig.slug}/academy/${uuid}`}
destination={`/${enterpriseConfig.slug}/academies/${uuid}/`}
className="academy-card"
>
<Card.Header title={title} />
<Card.Section>
{shortDescription}
</Card.Section>
<br />
<br />
<Card.Section className="clearfix">
<Image className="float-right" src={image} />
<Image className="float-right academy-card-image" src={image} />
</Card.Section>
</Card>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/academies/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as AcademyPage } from './AcademyPage';
export { default as AcademyDetailPage } from './AcademyDetailPage';
9 changes: 9 additions & 0 deletions src/components/academies/styles/Academy.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.academy-card {

.academy-card-image {
max-width: 50%;
position: absolute;
bottom: 1em;
right: 1em;
}
}
5 changes: 5 additions & 0 deletions src/components/app/EnterpriseAppPageRoutes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import AuthenticatedUserSubsidyPage from './AuthenticatedUserSubsidyPage';
import { features } from '../../config';
import { LicenseActivationPage } from '../license-activation';
import { PathwayProgressPage } from '../pathway-progress';
import { AcademyDetailPage } from '../academies';

// TODO: Techdebt, Create Context wrapper around this component for enterpriseCurations
// to reduce API calls by 2 (DashboardPage, CoursePage, SearchPage) or by 3 ( + AuthenticatedPage) if created in App.jsx
Expand All @@ -37,6 +38,10 @@ const EnterpriseAppPageRoutes = () => (
{features.FEATURE_ENABLE_PATHWAY_PROGRESS && (
<PageRoute exact path="/:enterpriseSlug/pathway/:pathwayUUID/progress" component={PathwayProgressPage} />
)}

{features.ENABLE_ACADEMIES && (
<PageRoute exact path="/:enterpriseSlug/academies/:academyUUID" component={AcademyDetailPage} />
)}
</AuthenticatedUserSubsidyPage>
);

Expand Down

0 comments on commit 1a795a0

Please sign in to comment.