Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brobro10000 committed Sep 30, 2024
1 parent 4a60624 commit c852bc0
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/components/app/data/hooks/useCourseMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default function useCourseMetadata(queryOptions = {}) {
enabled: !!courseKey,
...queryOptionsRest,
select: (data) => {
console.log(data, 'useC');
if (!data) {
return data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export function transformCourseRedemptionEligibility({
// redeemable subsidy access policy for any of the content keys.
const redeemableSubsidyAccessPolicy = preferredSubsidyAccessPolicy || otherSubsidyAccessPolicy;
const isPolicyRedemptionEnabled = hasSuccessfulRedemption || !!redeemableSubsidyAccessPolicy;
console.log(listPrice);
return {
isPolicyRedemptionEnabled,
redeemabilityPerContentKey: canRedeemData,
Expand Down
5 changes: 2 additions & 3 deletions src/components/course/CourseSidebarPrice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ const CourseSidebarPrice = () => {
const { isCourseAssigned } = useIsCourseAssigned();
const canRequestSubsidy = useCanUserRequestSubsidyForCourse();
const { userSubsidyApplicableToCourse } = useUserSubsidyApplicableToCourse();
console.log(coursePrice, 'hi');
if (!coursePrice) {
return <Skeleton containerTestId="course-price-skeleton" height={24} />;
}
console.log(coursePrice);
const originalPriceDisplay = getContentPriceDisplay(coursePrice.listRange);
const showOrigPrice = !enterpriseCustomer.hideCourseOriginalPrice;
const crossedOutOriginalPrice = (
Expand Down Expand Up @@ -76,7 +74,8 @@ const CourseSidebarPrice = () => {
);
}

const hasDiscountedPrice = coursePrice.discounted && sumOfArray(coursePrice.discounted) < sumOfArray(coursePrice.listRange);
const hasDiscountedPrice = coursePrice.discounted
&& sumOfArray(coursePrice.discounted) < sumOfArray(coursePrice.listRange);
// Case 2: No subsidies found but learner can request a subsidy
if (!hasDiscountedPrice && canRequestSubsidy) {
return (
Expand Down
3 changes: 0 additions & 3 deletions src/components/course/data/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,9 @@ export const useCoursePriceForUserSubsidy = ({
const currency = CURRENCY_USD;
const coursePrice = useMemo(
() => {
console.log(listPrice, 'hamzah');
if (!listPrice) {
return null;
}
console.log(listPrice, userSubsidyApplicableToCourse);

const onlyListPrice = {
listRange: listPrice,
Expand Down Expand Up @@ -637,7 +635,6 @@ export const useUserSubsidyApplicableToCourse = () => {
export function useCoursePrice() {
const { data: courseListPrice } = useCourseListPrice();
const { userSubsidyApplicableToCourse } = useUserSubsidyApplicableToCourse();
console.log(courseListPrice, userSubsidyApplicableToCourse);
return useCoursePriceForUserSubsidy({
userSubsidyApplicableToCourse,
listPrice: courseListPrice,
Expand Down
1 change: 0 additions & 1 deletion src/components/course/data/utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,6 @@ export function getEntitlementPrice(entitlements) {
* @returns Price for the course run.
*/
export function getCoursePrice(course) {
console.log(course, course.activeCourseRun?.fixedPriceUsd, course.activeCourseRun?.firstEnrollablePaidSeatPrice, course.entitlements);
if (course.activeCourseRun?.fixedPriceUsd) {
return [course.activeCourseRun?.fixedPriceUsd];
}
Expand Down
1 change: 0 additions & 1 deletion src/components/dashboard/SubscriptionExpirationModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const SubscriptionExpirationModal = () => {
const seenExpiredSubscriptionModal = !!global.localStorage.getItem(
EXPIRED_SUBSCRIPTION_MODAL_LOCALSTORAGE_KEY(subscriptionLicense),
);
console.log(seenExpiredSubscriptionModal);
const [isOpen, , close] = useToggle(!seenExpiredSubscriptionModal);
const { data: enterpriseCustomer } = useEnterpriseCustomer();
const {
Expand Down

0 comments on commit c852bc0

Please sign in to comment.