From f6e3c1bb8c17aaf568103b409fae5779a3447da6 Mon Sep 17 00:00:00 2001 From: streaper2 Date: Sat, 9 May 2026 21:19:52 +0200 Subject: [PATCH] feat: add Twitter support to business profile and implement DashboardProfile component --- components/dashboard/DashboardProfile.tsx | 9 ++++++++- next-env.d.ts | 2 +- types.ts | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/components/dashboard/DashboardProfile.tsx b/components/dashboard/DashboardProfile.tsx index f8ed992..8a1d214 100644 --- a/components/dashboard/DashboardProfile.tsx +++ b/components/dashboard/DashboardProfile.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useState, useEffect } from 'react'; -import { Image as ImageIcon, Sparkles, Youtube, X, Globe, Facebook, Linkedin, Instagram, CheckCircle, AlertCircle, Hash } from 'lucide-react'; +import { Image as ImageIcon, Sparkles, Youtube, X, Globe, Facebook, Linkedin, Instagram, Twitter, CheckCircle, AlertCircle, Hash } from 'lucide-react'; import { Business, Country } from '../../types'; import TagInput from '../TagInput'; import { generateBusinessDescription } from '../../lib/geminiService'; @@ -42,6 +42,7 @@ const normalizeBusinessData = (b: Business): Business => ({ facebook: b.socialLinks?.facebook || '', linkedin: b.socialLinks?.linkedin || '', instagram: b.socialLinks?.instagram || '', + twitter: b.socialLinks?.twitter || '', website: b.socialLinks?.website || '', } }); @@ -721,6 +722,12 @@ const DashboardProfile = ({ business, setBusiness }: { business: Business, setBu handleSocialChange('instagram', e.target.value)} className="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md focus:ring-brand-500 focus:border-brand-500 sm:text-sm border-gray-300" /> +
+ + + + handleSocialChange('twitter', e.target.value)} className="flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md focus:ring-brand-500 focus:border-brand-500 sm:text-sm border-gray-300" /> +
diff --git a/next-env.d.ts b/next-env.d.ts index c4b7818..9edff1c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/types.ts b/types.ts index 5751929..7ba375b 100644 --- a/types.ts +++ b/types.ts @@ -24,6 +24,7 @@ export interface SocialLinks { facebook?: string; linkedin?: string; instagram?: string; + twitter?: string; website?: string; }