feat: add certificate gallery and certifications section components
- Implemented CertificateGallery component to display certification images in a gallery format. - Created CertificationsSection component to showcase certifications with titles and descriptions. - Enhanced Gallery component to support animations and keyboard navigation. - Introduced Select component for dropdown selection with images. - Added utility functions for API responses and pagination handling. - Implemented localization functions for text and content. - Created a custom hook for detecting clicks outside of a component.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
import { mkdir, writeFile, readFile } from 'fs/promises';
|
||||
import path from 'path';
|
||||
import { serverError } from '@/lib/api-response';
|
||||
|
||||
const filePath = path.resolve(process.cwd(), 'data', 'contactMessages.json');
|
||||
|
||||
@@ -45,9 +46,6 @@ export async function POST(request: NextRequest) {
|
||||
message: 'Your message has been received.',
|
||||
});
|
||||
} catch (error) {
|
||||
return NextResponse.json(
|
||||
{ error, message: 'مشکلی پیش آمده.' },
|
||||
{ status: 400 },
|
||||
);
|
||||
return serverError('مشکلی پیش آمده.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user