Skip to content

Conversation

@sundarthapa2u
Copy link

No description provided.

{(shouldDisplayContentGating || unit.accessRestricted) && (
<Suspense fallback={<PageLoading srMessage={formatMessage(messages.loadingLockedContent)} />}>
<GatedUnitContentMessageSlot courseId={courseId} />
{unit.accessRestricted ? <AccessLockContentMessageSlot courseId={courseId} /> : <GatedUnitContentMessageSlot courseId={courseId} />}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help me understand why you're adding a new plugin slot that, functionally, is almost identical to GatedUnitContentMessageSlot. Can't you just use the existing plugin slot to render your component?

@@ -0,0 +1,59 @@
import React, { useCallback } from 'react';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a duplicate of the AccessLock in https://github.com/edx/frontend-plugin-advertisements/pull/106. Is there a reason this shouldn't be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants