Fix: Auth 500 error, script tag warning, dynamic import, rate limit

This commit is contained in:
Mustafa Cetin committed 2026-07-29 12:56:28 +00:00
1 parent 8507984c7e
commit 55c916a9e9
8 files changed
+43 -10

No files matched your search

+1
View File
@@ -153,6 +153,7 @@ import ResourceLibraryView from './resource-library-view';
// Dynamic imports for heavy components with loading skeletons
const AnalyticsView = dynamic(() => import('./analytics-view'), {
ssr: false,
loading: () => <div className="space-y-4 p-4"><Skeleton className="h-8 w-48" /><div className="grid grid-cols-1 md:grid-cols-3 gap-4">{[1,2,3].map(i => <Skeleton key={i} className="h-32" />)}</div><Skeleton className="h-64" /></div>,
});
+2 -1
View File
@@ -101,6 +101,7 @@ import { useAppStore, type ViewName, type CurrentUser } from '@/lib/store';
import { t } from '@/lib/i18n';
import { fetchDashboard, type DashboardData, getStoredNotifications, type AppNotification, addNotification, markNotificationsRead, fetchParentLinks, type ParentStudentLinkData, fetchStudents } from '@/lib/api';
import { apiGet, apiPost, apiPut } from '@/lib/api';
import { sanitizeHtml } from '@/lib/utils';
import { fetchNewsletters, createNewsletter, type NewsletterData } from '@/lib/api';
const containerVariants = {
@@ -2645,7 +2646,7 @@ function DashboardNewsletterCard({ currentUser, locale }: { currentUser: Current
<img src={viewingNewsletter.imageUrl} alt="" className="w-full h-48 object-cover" />
</div>
)}
<div className="prose prose-sm dark:prose-invert max-w-none" dangerouslySetInnerHTML={{ __html: viewingNewsletter.content }} />
<div className="prose prose-sm dark:prose-invert max-w-none" dangerouslySetInnerHTML={{ __html: sanitizeHtml(viewingNewsletter.content) }} />
{viewingNewsletter.tags && (() => {
try {
const parsed = JSON.parse(viewingNewsletter.tags);