feat: integrate mintel annotator with email submission and environment restrictions
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 38s
Build & Deploy / 🧪 QA (push) Failing after 36s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s

This commit is contained in:
2026-06-19 15:13:07 +02:00
parent 2b8dc19032
commit 38a870bea8
11 changed files with 206 additions and 267 deletions

View File

@@ -0,0 +1,30 @@
'use client';
import { Annotator } from '@mintel/annotator';
import { useEffect, useState } from 'react';
import { getAnnotatorAssets } from '@/app/actions/getAnnotatorAssets';
import { submitAnnotations } from '@/app/actions/submitAnnotations';
export default function AnnotatorClientWrapper() {
const [assets, setAssets] = useState<string[]>([]);
useEffect(() => {
getAnnotatorAssets().then(fetchedAssets => {
console.log('[AnnotatorClientWrapper] fetchedAssets:', fetchedAssets);
if (Array.isArray(fetchedAssets)) {
setAssets(fetchedAssets);
}
}).catch(err => {
console.error('[AnnotatorClientWrapper] Action failed:', err);
});
}, []);
const handleSubmit = async (annotations: any[]) => {
const result = await submitAnnotations(annotations);
if (!result.success) {
throw new Error(result.error);
}
};
return <Annotator assets={assets} onSubmit={handleSubmit} />;
}

View File

@@ -131,16 +131,8 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
transition={{ delay: i * 0.1, duration: 0.6, ease: "easeOut" }}
className="flex-shrink-0 w-[320px] md:w-[480px] snap-center group pointer-events-auto"
>
<Link
href={`/${locale}/referenzen/${ref.slug}`}
<div
data-testid="reference-tile"
draggable={false}
onClick={(e) => {
if (dragDistanceRef.current > 15) {
e.preventDefault();
}
dragDistanceRef.current = 0;
}}
className="block relative select-none aspect-[16/10] bg-neutral-800 rounded-2xl overflow-hidden mb-5 border border-white/5 shadow-2xl"
>
<Image
@@ -161,7 +153,7 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
</span>
<h4 className="font-heading text-xl md:text-2xl font-bold leading-tight break-words">{ref.title}</h4>
</div>
</Link>
</div>
</motion.div>
);
})}