Skip to content

Commit

Permalink
fix(coursesettingform): invalid course logo falls back to title
Browse files Browse the repository at this point in the history
  • Loading branch information
purfectliterature committed Dec 9, 2022
1 parent bccb281 commit 13f225e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const CourseSettingsForm = (props: CourseSettingsFormProps): JSX.Element => {
</Subsection>

<AvatarSelector
alt={props.data.title}
defaultImageUrl={watch('logo')}
disabled={props.disabled}
onSelectImage={setStagedLogo}
Expand Down
2 changes: 2 additions & 0 deletions client/app/lib/components/core/AvatarSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const DEFAULT_IMAGE_NAME = 'image';

interface AvatarSelectorProps {
title: string;
alt?: string;
defaultImageUrl?: string;
stagedImage?: File;
onSelectImage?: (image: File) => void;
Expand Down Expand Up @@ -77,6 +78,7 @@ const AvatarSelector = (props: AvatarSelectorProps): JSX.Element => {
<Subsection title={props.title}>
<div className="relative">
<Avatar
alt={props.alt}
className="h-80 w-80"
src={
props.stagedImage
Expand Down

0 comments on commit 13f225e

Please sign in to comment.