Make URLs in homework answers and feedback clickable
Apply linkify() to student submission text (curator review page + student cabinet: reviewed/approved/pending) and to curator feedback text, so pasted links (e.g. Yandex.Disk) render as clickable anchors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import { notFound } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import { linkify } from "@/lib/linkify";
|
||||
import { FeedbackForm } from "./feedback-form";
|
||||
import { ContentTabs } from "./content-tabs";
|
||||
import { DeleteSubmissionButton } from "./delete-button";
|
||||
@@ -151,7 +152,7 @@ export default async function SubmissionPage({ params }: Props) {
|
||||
className="px-4 py-3 text-sm whitespace-pre-wrap"
|
||||
style={{ border: "2px solid var(--border)" }}
|
||||
>
|
||||
{submission.text}
|
||||
{linkify(submission.text)}
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-sm italic" style={{ color: "var(--muted-foreground)" }}>
|
||||
|
||||
Reference in New Issue
Block a user