feat: Implement AI tutor functionality, add branding fields, and improve API URL handling.

This commit is contained in:
2026-01-23 14:48:41 -03:00
parent 60e2af72f0
commit 470c7f0172
30 changed files with 1352 additions and 274 deletions
@@ -1,7 +1,7 @@
"use client";
import { FileText, Download, Eye, ExternalLink } from "lucide-react";
import { CMS_API_URL } from "@/lib/api";
import { getCmsApiUrl } from "@/lib/api";
interface DocumentPlayerProps {
id: string;
@@ -18,7 +18,7 @@ export default function DocumentPlayer({ id, title, url }: DocumentPlayerProps)
if (path.startsWith('http')) return path;
const cleanPath = path.startsWith('/uploads') ? path.replace('/uploads', '/assets') : path;
const finalPath = cleanPath.startsWith('/') ? cleanPath : `/${cleanPath}`;
return `${CMS_API_URL}${finalPath}`;
return `${getCmsApiUrl()}${finalPath}`;
};
const displayUrl = getFullUrl(url);