Skip to content

Commit

Permalink
fix: merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Oct 8, 2024
1 parent d602803 commit 5b8042d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/library-authoring/component-info/ComponentInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ import {
} from '@openedx/paragon';

import { useLibraryContext } from '../common/context';
import { getEditUrl } from '../components/utils';
import { ComponentMenu } from '../components';
import { canEditComponent } from '../components/ComponentEditorModal';
import ComponentDetails from './ComponentDetails';
import ComponentManagement from './ComponentManagement';
import ComponentPreview from './ComponentPreview';
import messages from './messages';
import { canEditComponent } from '../components/ComponentEditorModal';
import { useLibraryContext } from '../common/context';
import { useContentLibrary } from '../data/apiHooks';

const ComponentInfo = () => {
const intl = useIntl();
Expand All @@ -30,15 +27,14 @@ const ComponentInfo = () => {
return null;
}

const editUrl = getEditUrl(usageKey);
const canEdit = canEditComponent(usageKey);

return (
<Stack>
{!readOnly && (
<div className="d-flex flex-wrap">
<Button
{...(canEdit ? { onClick: () => openComponentEditor(usageKey) } : { disabled: true })}
{...(canEdit ? { onClick: () => openComponentEditor(usageKey) } : { disabled: true })}
variant="outline-primary"
className="m-1 text-nowrap flex-grow-1"
>
Expand Down
2 changes: 1 addition & 1 deletion src/library-authoring/components/BaseComponentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const BaseComponentCard = ({
+ (tags.level2?.length || 0) + (tags.level3?.length || 0);
}, [tags]);

const componentIcon = getItemIcon(type);
const componentIcon = getItemIcon(componentType);
const { componentPickerMode } = useLibraryContext();

return (
Expand Down

0 comments on commit 5b8042d

Please sign in to comment.