feat: add Twitter support to business profile and implement DashboardProfile component
This commit is contained in:
@@ -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
|
||||
</span>
|
||||
<input type="text" placeholder="Lien Instagram" value={formData.socialLinks?.instagram || ''} onChange={(e) => 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" />
|
||||
</div>
|
||||
<div className="flex rounded-md shadow-sm">
|
||||
<span className="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500">
|
||||
<Twitter className="w-4 h-4" />
|
||||
</span>
|
||||
<input type="text" placeholder="Lien Twitter (X)" value={formData.socialLinks?.twitter || ''} onChange={(e) => 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" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user