Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/src/components/teach/course-preview-shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
{/* Right stats card / cover preview */}
<div className="flex flex-col justify-between gap-4 rounded-xl border border-border bg-muted/35 p-5">
{course.coverUrl ? (
<img

Check warning on line 421 in frontend/src/components/teach/course-preview-shell.tsx

View workflow job for this annotation

GitHub Actions / Web — typecheck, lint, test, build

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
src={course.coverUrl}
alt=""
className="h-36 w-full rounded-lg object-cover"
Expand Down Expand Up @@ -860,10 +860,10 @@
) : null}

{course.projectGoal ? (
<p className="mt-4 rounded-lg border border-border bg-card px-4 py-3 text-base leading-6 text-muted-foreground">
<span className="font-medium text-foreground">The project: </span>
{course.projectGoal.trim().replace(/\.+$/, "")}.
</p>
<details className="mt-4 rounded-lg border border-border bg-card px-4 py-3 text-base leading-6 text-muted-foreground">
<summary className="cursor-pointer font-medium text-foreground">Project overview</summary>
<p className="mt-2">{course.projectGoal.trim().replace(/\.+$/, "")}.</p>
</details>
) : null}

{activeChapter.isMilestone ? (
Expand Down
5 changes: 4 additions & 1 deletion packages/learning-ui/src/components/learn/learning-log.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,15 @@ function LearningLogQuestion({
);
}

/** One shared object, so the default never looks like new data on every render. */
const NO_INITIAL_ANSWERS: LearningLogAnswers = {};

export function LearningLog({
title = "Share what you learned",
instruction,
questions,
variant = "default",
initialAnswers = {},
initialAnswers = NO_INITIAL_ANSWERS,
onSave,
}: {
title?: string;
Expand Down
Loading