Add core value to main page and inrease image size

This commit is contained in:
MartinBraquet
2025-08-03 14:21:51 +02:00
parent 1f7b22f44e
commit 9c85da0831
3 changed files with 16 additions and 14 deletions

View File

@@ -31,9 +31,9 @@ export async function POST(request: Request) {
return NextResponse.json({error: 'Only image files are allowed'}, {status: 400});
}
// Validate file size (5MB max)
if (file.size > 5 * 1024 * 1024) {
return NextResponse.json({error: 'File size must be less than 5MB'}, {status: 400});
// Validate file size (10MB max)
if (file.size > 10 * 1024 * 1024) {
return NextResponse.json({error: 'File size must be less than 10MB'}, {status: 400});
}
const fileExtension = file.name.split('.').pop();

View File

@@ -208,7 +208,7 @@ function RegisterComponent() {
return;
}
if (file.size > 5 * 1024 * 1024) {
if (file.size > 10 * 1024 * 1024) {
setError('Image size must be less than 5MB');
return;
}

View File

@@ -211,6 +211,18 @@ export default function ProfilePage() {
</p>
</div>
</div>
<div className="mt-4 space-y-2 flex-grow">
{user.profile?.coreValues && user.profile.coreValues.length > 0 && (
<div className="flex flex-wrap gap-1">
{user.profile.coreValues.slice(0, 6).map(({value}) => (
<span key={value?.id}
className="inline-block text-xs px-2 py-1 bg-blue-50 text-blue-700 dark:text-white dark:bg-gray-700 rounded-full">
{value?.name}
</span>
))}
</div>
)}
</div>
<div className="mt-4 space-y-2 flex-grow">
{user.profile?.intellectualInterests && user.profile.intellectualInterests.length > 0 && (
<div className="flex flex-wrap gap-1">
@@ -222,16 +234,6 @@ export default function ProfilePage() {
))}
</div>
)}
{/*{user.profile?.causeAreas && user.profile.causeAreas.length > 0 && (*/}
{/* <div className="flex flex-wrap gap-1">*/}
{/* {user.profile.causeAreas.slice(0, 3).map(({causeArea}) => (*/}
{/* <span key={causeArea?.id}*/}
{/* className="inline-block text-xs px-2 py-1 bg-blue-50 text-blue-700 dark:text-white dark:bg-gray-700 rounded-full">*/}
{/* {causeArea?.name}*/}
{/* </span>*/}
{/* ))}*/}
{/* </div>*/}
{/*)}*/}
</div>
</div>
</Link>