This commit is contained in:
@@ -4,11 +4,11 @@ import prisma from '../../../../../lib/prisma'
|
|||||||
// PATCH /api/admin/reports/[id] — Update report status
|
// PATCH /api/admin/reports/[id] — Update report status
|
||||||
export async function PATCH(
|
export async function PATCH(
|
||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
{ params }: { params: Promise<{ id: string }> }
|
context: { params: Promise<{ id: string }> }
|
||||||
) {
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const userId = request.headers.get('x-user-id')
|
const userId = request.headers.get('x-user-id')
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const { status } = await request.json()
|
const { status } = await request.json()
|
||||||
|
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
|
|||||||
@@ -4,9 +4,12 @@ import prisma from '../../../../lib/prisma'
|
|||||||
type Params = { params: Promise<{ id: string }> }
|
type Params = { params: Promise<{ id: string }> }
|
||||||
|
|
||||||
// GET /api/blog/[id]
|
// GET /api/blog/[id]
|
||||||
export async function GET(_request: NextRequest, { params }: Params) {
|
export async function GET(
|
||||||
|
_request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const post = await prisma.blogPost.findUnique({ where: { id } })
|
const post = await prisma.blogPost.findUnique({ where: { id } })
|
||||||
if (!post) return NextResponse.json({ error: 'Non trouvé' }, { status: 404 })
|
if (!post) return NextResponse.json({ error: 'Non trouvé' }, { status: 404 })
|
||||||
return NextResponse.json(post)
|
return NextResponse.json(post)
|
||||||
@@ -17,9 +20,12 @@ export async function GET(_request: NextRequest, { params }: Params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PATCH /api/blog/[id]
|
// PATCH /api/blog/[id]
|
||||||
export async function PATCH(request: NextRequest, { params }: Params) {
|
export async function PATCH(
|
||||||
|
request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const body = await request.json()
|
const body = await request.json()
|
||||||
const post = await prisma.blogPost.update({ where: { id }, data: body })
|
const post = await prisma.blogPost.update({ where: { id }, data: body })
|
||||||
return NextResponse.json(post)
|
return NextResponse.json(post)
|
||||||
@@ -30,9 +36,12 @@ export async function PATCH(request: NextRequest, { params }: Params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DELETE /api/blog/[id]
|
// DELETE /api/blog/[id]
|
||||||
export async function DELETE(_request: NextRequest, { params }: Params) {
|
export async function DELETE(
|
||||||
|
_request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
await prisma.blogPost.delete({ where: { id } })
|
await prisma.blogPost.delete({ where: { id } })
|
||||||
return NextResponse.json({ success: true })
|
return NextResponse.json({ success: true })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -4,9 +4,12 @@ import prisma from '../../../../lib/prisma'
|
|||||||
type Params = { params: Promise<{ id: string }> }
|
type Params = { params: Promise<{ id: string }> }
|
||||||
|
|
||||||
// GET /api/businesses/[id]
|
// GET /api/businesses/[id]
|
||||||
export async function GET(_request: NextRequest, { params }: Params) {
|
export async function GET(
|
||||||
|
_request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const business = await prisma.business.findFirst({
|
const business = await prisma.business.findFirst({
|
||||||
where: {
|
where: {
|
||||||
OR: [
|
OR: [
|
||||||
@@ -25,9 +28,12 @@ export async function GET(_request: NextRequest, { params }: Params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PATCH /api/businesses/[id]
|
// PATCH /api/businesses/[id]
|
||||||
export async function PATCH(request: NextRequest, { params }: Params) {
|
export async function PATCH(
|
||||||
|
request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const body = await request.json()
|
const body = await request.json()
|
||||||
const business = await prisma.business.update({
|
const business = await prisma.business.update({
|
||||||
where: { id },
|
where: { id },
|
||||||
@@ -42,9 +48,12 @@ export async function PATCH(request: NextRequest, { params }: Params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DELETE /api/businesses/[id]
|
// DELETE /api/businesses/[id]
|
||||||
export async function DELETE(_request: NextRequest, { params }: Params) {
|
export async function DELETE(
|
||||||
|
_request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
await prisma.business.delete({ where: { id } })
|
await prisma.business.delete({ where: { id } })
|
||||||
return NextResponse.json({ success: true })
|
return NextResponse.json({ success: true })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import prisma from '../../../../../lib/prisma'
|
|||||||
// PATCH /api/conversations/[id]/archive — Toggle archive status for the user
|
// PATCH /api/conversations/[id]/archive — Toggle archive status for the user
|
||||||
export async function PATCH(
|
export async function PATCH(
|
||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
{ params }: { params: Promise<{ id: string }> }
|
context: { params: Promise<{ id: string }> }
|
||||||
) {
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const userId = request.headers.get('x-user-id')
|
const userId = request.headers.get('x-user-id')
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const { archived } = await request.json()
|
const { archived } = await request.json()
|
||||||
|
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import prisma from '../../../../lib/prisma'
|
|||||||
// GET /api/conversations/[id] — Get messages for a conversation
|
// GET /api/conversations/[id] — Get messages for a conversation
|
||||||
export async function GET(
|
export async function GET(
|
||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
{ params }: { params: Promise<{ id: string }> }
|
context: { params: Promise<{ id: string }> }
|
||||||
) {
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const userId = request.headers.get('x-user-id')
|
const userId = request.headers.get('x-user-id')
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
|
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
return NextResponse.json({ error: 'Utilisateur non identifié' }, { status: 401 })
|
return NextResponse.json({ error: 'Utilisateur non identifié' }, { status: 401 })
|
||||||
@@ -36,6 +36,7 @@ export async function GET(
|
|||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
name: true,
|
name: true,
|
||||||
|
email: true,
|
||||||
avatar: true
|
avatar: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export async function GET(request: NextRequest) {
|
|||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
name: true,
|
name: true,
|
||||||
|
email: true,
|
||||||
avatar: true,
|
avatar: true,
|
||||||
role: true
|
role: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,12 @@ import prisma from '../../../../lib/prisma'
|
|||||||
type Params = { params: Promise<{ id: string }> }
|
type Params = { params: Promise<{ id: string }> }
|
||||||
|
|
||||||
// GET /api/interviews/[id]
|
// GET /api/interviews/[id]
|
||||||
export async function GET(_request: NextRequest, { params }: Params) {
|
export async function GET(
|
||||||
|
_request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const interview = await prisma.interview.findUnique({ where: { id } })
|
const interview = await prisma.interview.findUnique({ where: { id } })
|
||||||
if (!interview) return NextResponse.json({ error: 'Non trouvé' }, { status: 404 })
|
if (!interview) return NextResponse.json({ error: 'Non trouvé' }, { status: 404 })
|
||||||
return NextResponse.json(interview)
|
return NextResponse.json(interview)
|
||||||
@@ -17,9 +20,12 @@ export async function GET(_request: NextRequest, { params }: Params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PATCH /api/interviews/[id]
|
// PATCH /api/interviews/[id]
|
||||||
export async function PATCH(request: NextRequest, { params }: Params) {
|
export async function PATCH(
|
||||||
|
request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const body = await request.json()
|
const body = await request.json()
|
||||||
const interview = await prisma.interview.update({ where: { id }, data: body })
|
const interview = await prisma.interview.update({ where: { id }, data: body })
|
||||||
return NextResponse.json(interview)
|
return NextResponse.json(interview)
|
||||||
@@ -30,9 +36,12 @@ export async function PATCH(request: NextRequest, { params }: Params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DELETE /api/interviews/[id]
|
// DELETE /api/interviews/[id]
|
||||||
export async function DELETE(_request: NextRequest, { params }: Params) {
|
export async function DELETE(
|
||||||
|
_request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
await prisma.interview.delete({ where: { id } })
|
await prisma.interview.delete({ where: { id } })
|
||||||
return NextResponse.json({ success: true })
|
return NextResponse.json({ success: true })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import prisma from '../../../../../lib/prisma'
|
|||||||
// POST /api/messages/[id]/report — Report a message for moderation
|
// POST /api/messages/[id]/report — Report a message for moderation
|
||||||
export async function POST(
|
export async function POST(
|
||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
{ params }: { params: Promise<{ id: string }> }
|
context: { params: Promise<{ id: string }> }
|
||||||
) {
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const userId = request.headers.get('x-user-id')
|
const userId = request.headers.get('x-user-id')
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const { reason } = await request.json()
|
const { reason } = await request.json()
|
||||||
|
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
|
|||||||
@@ -4,9 +4,12 @@ import prisma from '../../../../lib/prisma'
|
|||||||
type Params = { params: Promise<{ id: string }> }
|
type Params = { params: Promise<{ id: string }> }
|
||||||
|
|
||||||
// GET /api/offers/[id]
|
// GET /api/offers/[id]
|
||||||
export async function GET(_request: NextRequest, { params }: Params) {
|
export async function GET(
|
||||||
|
_request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const offer = await prisma.offer.findUnique({
|
const offer = await prisma.offer.findUnique({
|
||||||
where: { id },
|
where: { id },
|
||||||
include: { business: true },
|
include: { business: true },
|
||||||
@@ -20,9 +23,12 @@ export async function GET(_request: NextRequest, { params }: Params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PATCH /api/offers/[id]
|
// PATCH /api/offers/[id]
|
||||||
export async function PATCH(request: NextRequest, { params }: Params) {
|
export async function PATCH(
|
||||||
|
request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
const body = await request.json()
|
const body = await request.json()
|
||||||
const offer = await prisma.offer.update({
|
const offer = await prisma.offer.update({
|
||||||
where: { id },
|
where: { id },
|
||||||
@@ -37,9 +43,12 @@ export async function PATCH(request: NextRequest, { params }: Params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DELETE /api/offers/[id]
|
// DELETE /api/offers/[id]
|
||||||
export async function DELETE(_request: NextRequest, { params }: Params) {
|
export async function DELETE(
|
||||||
|
_request: NextRequest,
|
||||||
|
context: { params: Promise<{ id: string }> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const { id } = await params
|
const { id } = await context.params
|
||||||
await prisma.offer.delete({ where: { id } })
|
await prisma.offer.delete({ where: { id } })
|
||||||
return NextResponse.json({ success: true })
|
return NextResponse.json({ success: true })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ import { NextRequest, NextResponse } from 'next/server'
|
|||||||
import prisma from '../../../../lib/prisma'
|
import prisma from '../../../../lib/prisma'
|
||||||
|
|
||||||
// PATCH /api/users/me — Update personal user profile
|
// PATCH /api/users/me — Update personal user profile
|
||||||
export async function PATCH(request: NextRequest) {
|
export async function PATCH(
|
||||||
|
request: NextRequest,
|
||||||
|
context: { params: Promise<any> }
|
||||||
|
): Promise<Response> {
|
||||||
try {
|
try {
|
||||||
const userId = request.headers.get('x-user-id')
|
const userId = request.headers.get('x-user-id')
|
||||||
const data = await request.json()
|
const data = await request.json()
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ export async function GET(request: NextRequest) {
|
|||||||
name: true,
|
name: true,
|
||||||
email: true,
|
email: true,
|
||||||
role: true,
|
role: true,
|
||||||
avatar: true
|
avatar: true,
|
||||||
|
phone: true,
|
||||||
|
bio: true,
|
||||||
|
location: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect, Suspense } from 'react';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { LayoutDashboard, Edit3, ShoppingBag, CreditCard, LogOut, Eye, MessageSquare, User as UserIcon, Rocket, ShieldAlert } from 'lucide-react';
|
import { LayoutDashboard, Edit3, ShoppingBag, CreditCard, LogOut, Eye, MessageSquare, User as UserIcon, Rocket, ShieldAlert } from 'lucide-react';
|
||||||
import { useRouter, useSearchParams } from 'next/navigation';
|
import { useRouter, useSearchParams } from 'next/navigation';
|
||||||
@@ -15,7 +15,7 @@ import DashboardOffers from '../../components/dashboard/DashboardOffers';
|
|||||||
import PricingSection from '../../components/PricingSection';
|
import PricingSection from '../../components/PricingSection';
|
||||||
import { useUser } from '../../components/UserProvider';
|
import { useUser } from '../../components/UserProvider';
|
||||||
|
|
||||||
const DashboardPage = () => {
|
const DashboardContent = () => {
|
||||||
const { user, logout } = useUser();
|
const { user, logout } = useUser();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
@@ -319,4 +319,16 @@ const DashboardPage = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DashboardPage = () => {
|
||||||
|
return (
|
||||||
|
<Suspense fallback={
|
||||||
|
<div className="min-h-screen flex items-center justify-center bg-gray-50">
|
||||||
|
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-brand-600"></div>
|
||||||
|
</div>
|
||||||
|
}>
|
||||||
|
<DashboardContent />
|
||||||
|
</Suspense>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default DashboardPage;
|
export default DashboardPage;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ interface Message {
|
|||||||
createdAt: string;
|
createdAt: string;
|
||||||
sender: {
|
sender: {
|
||||||
name: string;
|
name: string;
|
||||||
|
email?: string;
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -25,9 +26,11 @@ interface Conversation {
|
|||||||
ownerId: string;
|
ownerId: string;
|
||||||
};
|
};
|
||||||
participants: {
|
participants: {
|
||||||
|
isArchived: boolean;
|
||||||
user: {
|
user: {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
email?: string;
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
};
|
};
|
||||||
}[];
|
}[];
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ export const MOCK_BUSINESSES: Business[] = [
|
|||||||
},
|
},
|
||||||
contactEmail: 'contact@afrotech.ci',
|
contactEmail: 'contact@afrotech.ci',
|
||||||
contactPhone: '+225 07 07 07 07 07',
|
contactPhone: '+225 07 07 07 07 07',
|
||||||
|
showEmail: true,
|
||||||
|
showPhone: true,
|
||||||
|
showSocials: true,
|
||||||
|
isActive: true,
|
||||||
verified: true,
|
verified: true,
|
||||||
viewCount: 1240,
|
viewCount: 1240,
|
||||||
rating: 4.8,
|
rating: 4.8,
|
||||||
@@ -33,7 +37,6 @@ export const MOCK_BUSINESSES: Business[] = [
|
|||||||
// Featured Data
|
// Featured Data
|
||||||
isFeatured: true,
|
isFeatured: true,
|
||||||
founderName: 'Jean-Marc Kouassi',
|
founderName: 'Jean-Marc Kouassi',
|
||||||
// UPDATED IMAGE: Profile of an Afro-descendant entrepreneur
|
|
||||||
founderImageUrl: 'https://images.unsplash.com/photo-1531384441138-2736e62e0919?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80',
|
founderImageUrl: 'https://images.unsplash.com/photo-1531384441138-2736e62e0919?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80',
|
||||||
keyMetric: '+50 Projets Livrés'
|
keyMetric: '+50 Projets Livrés'
|
||||||
},
|
},
|
||||||
@@ -47,6 +50,10 @@ export const MOCK_BUSINESSES: Business[] = [
|
|||||||
logoUrl: 'https://picsum.photos/200/200?random=2',
|
logoUrl: 'https://picsum.photos/200/200?random=2',
|
||||||
contactEmail: 'hello@baobabfoods.fr',
|
contactEmail: 'hello@baobabfoods.fr',
|
||||||
contactPhone: '+33 6 12 34 56 78',
|
contactPhone: '+33 6 12 34 56 78',
|
||||||
|
showEmail: true,
|
||||||
|
showPhone: true,
|
||||||
|
showSocials: true,
|
||||||
|
isActive: true,
|
||||||
verified: true,
|
verified: true,
|
||||||
viewCount: 850,
|
viewCount: 850,
|
||||||
rating: 4.9,
|
rating: 4.9,
|
||||||
@@ -64,6 +71,10 @@ export const MOCK_BUSINESSES: Business[] = [
|
|||||||
description: 'Création de tenues modernes utilisant le tissu Ankara authentique. Nous travaillons directement avec des tisserands locaux pour garantir une qualité exceptionnelle et une rémunération équitable. Exportation internationale et vente en ligne.',
|
description: 'Création de tenues modernes utilisant le tissu Ankara authentique. Nous travaillons directement avec des tisserands locaux pour garantir une qualité exceptionnelle et une rémunération équitable. Exportation internationale et vente en ligne.',
|
||||||
logoUrl: 'https://picsum.photos/200/200?random=3',
|
logoUrl: 'https://picsum.photos/200/200?random=3',
|
||||||
contactEmail: 'sales@lagosfashion.ng',
|
contactEmail: 'sales@lagosfashion.ng',
|
||||||
|
showEmail: true,
|
||||||
|
showPhone: false,
|
||||||
|
showSocials: false,
|
||||||
|
isActive: true,
|
||||||
verified: false,
|
verified: false,
|
||||||
viewCount: 320,
|
viewCount: 320,
|
||||||
rating: 4.5,
|
rating: 4.5,
|
||||||
@@ -80,6 +91,10 @@ export const MOCK_BUSINESSES: Business[] = [
|
|||||||
logoUrl: 'https://picsum.photos/200/200?random=4',
|
logoUrl: 'https://picsum.photos/200/200?random=4',
|
||||||
contactEmail: 'info@saharasolar.sn',
|
contactEmail: 'info@saharasolar.sn',
|
||||||
contactPhone: '+221 77 000 00 00',
|
contactPhone: '+221 77 000 00 00',
|
||||||
|
showEmail: true,
|
||||||
|
showPhone: true,
|
||||||
|
showSocials: false,
|
||||||
|
isActive: true,
|
||||||
verified: true,
|
verified: true,
|
||||||
viewCount: 560,
|
viewCount: 560,
|
||||||
rating: 4.7,
|
rating: 4.7,
|
||||||
@@ -98,6 +113,10 @@ export const MOCK_BUSINESSES: Business[] = [
|
|||||||
contactEmail: 'contact@nubianessence.cm',
|
contactEmail: 'contact@nubianessence.cm',
|
||||||
contactPhone: '+237 6 99 99 99 99',
|
contactPhone: '+237 6 99 99 99 99',
|
||||||
socialLinks: { instagram: 'https://instagram.com', facebook: 'https://facebook.com' },
|
socialLinks: { instagram: 'https://instagram.com', facebook: 'https://facebook.com' },
|
||||||
|
showEmail: true,
|
||||||
|
showPhone: true,
|
||||||
|
showSocials: true,
|
||||||
|
isActive: true,
|
||||||
verified: true,
|
verified: true,
|
||||||
viewCount: 410,
|
viewCount: 410,
|
||||||
rating: 4.6,
|
rating: 4.6,
|
||||||
@@ -117,6 +136,10 @@ export const MOCK_BUSINESSES: Business[] = [
|
|||||||
contactEmail: 'admissions@kijani.ke',
|
contactEmail: 'admissions@kijani.ke',
|
||||||
contactPhone: '+254 700 000 000',
|
contactPhone: '+254 700 000 000',
|
||||||
socialLinks: { linkedin: 'https://linkedin.com', website: 'https://kijani.ke' },
|
socialLinks: { linkedin: 'https://linkedin.com', website: 'https://kijani.ke' },
|
||||||
|
showEmail: true,
|
||||||
|
showPhone: true,
|
||||||
|
showSocials: true,
|
||||||
|
isActive: true,
|
||||||
verified: true,
|
verified: true,
|
||||||
viewCount: 980,
|
viewCount: 980,
|
||||||
rating: 5.0,
|
rating: 5.0,
|
||||||
@@ -133,6 +156,10 @@ export const MOCK_BUSINESSES: Business[] = [
|
|||||||
description: 'La solution de paiement agrégée pour les e-commerçants en RDC. Acceptez M-Pesa, Orange Money, Airtel Money et les cartes Visa/Mastercard via une API unique et sécurisée.',
|
description: 'La solution de paiement agrégée pour les e-commerçants en RDC. Acceptez M-Pesa, Orange Money, Airtel Money et les cartes Visa/Mastercard via une API unique et sécurisée.',
|
||||||
logoUrl: 'https://picsum.photos/200/200?random=7',
|
logoUrl: 'https://picsum.photos/200/200?random=7',
|
||||||
contactEmail: 'biz@payna.cd',
|
contactEmail: 'biz@payna.cd',
|
||||||
|
showEmail: true,
|
||||||
|
showPhone: false,
|
||||||
|
showSocials: false,
|
||||||
|
isActive: true,
|
||||||
verified: false,
|
verified: false,
|
||||||
viewCount: 230,
|
viewCount: 230,
|
||||||
rating: 4.2,
|
rating: 4.2,
|
||||||
@@ -150,6 +177,10 @@ export const MOCK_BUSINESSES: Business[] = [
|
|||||||
contactEmail: 'projet@ecobati.bj',
|
contactEmail: 'projet@ecobati.bj',
|
||||||
contactPhone: '+229 97 00 00 00',
|
contactPhone: '+229 97 00 00 00',
|
||||||
socialLinks: { instagram: 'https://instagram.com', website: 'https://ecobati.bj' },
|
socialLinks: { instagram: 'https://instagram.com', website: 'https://ecobati.bj' },
|
||||||
|
showEmail: true,
|
||||||
|
showPhone: true,
|
||||||
|
showSocials: true,
|
||||||
|
isActive: true,
|
||||||
verified: true,
|
verified: true,
|
||||||
viewCount: 670,
|
viewCount: 670,
|
||||||
rating: 4.8,
|
rating: 4.8,
|
||||||
|
|||||||
2
next-env.d.ts
vendored
2
next-env.d.ts
vendored
@@ -1,6 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/dev/types/routes.d.ts";
|
import "./.next/types/routes.d.ts";
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
|
|||||||
3
types.ts
3
types.ts
@@ -11,6 +11,9 @@ export interface User {
|
|||||||
email: string;
|
email: string;
|
||||||
role: UserRole;
|
role: UserRole;
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
|
phone?: string;
|
||||||
|
bio?: string;
|
||||||
|
location?: string;
|
||||||
isSuspended?: boolean;
|
isSuspended?: boolean;
|
||||||
suspensionReason?: string;
|
suspensionReason?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user