Skip to content

Commit

Permalink
style: Nits on the code
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisChV committed Feb 6, 2025
1 parent 660d35f commit bfc12d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/library-authoring/LibraryBlock/LibraryBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const LibraryBlock = ({
view,
}: LibraryBlockProps) => {
const iframeRef = useRef<HTMLIFrameElement>(null);
const defaultiFrameHeight = view === 'studio_view' ? 80 : 50;
const xblockView = view ?? 'student_view';
const defaultiFrameHeight = xblockView === 'studio_view' ? 80 : 50;

const [iFrameHeight, setIFrameHeight] = useState(defaultiFrameHeight);
const studioBaseUrl = getConfig().STUDIO_BASE_URL;
Expand Down Expand Up @@ -79,8 +80,6 @@ export const LibraryBlock = ({

const queryStr = version ? `?version=${version}` : '';

const xblockView = view ?? 'student_view';

return (
<div style={{
height: `${iFrameHeight}vh`,
Expand Down

0 comments on commit bfc12d1

Please sign in to comment.