All files / src/components/company-profile SocialLinksForm.tsx

100% Statements 9/9
100% Branches 0/0
100% Functions 9/9
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202                                                                                                                199x                                               12x                               1x                               1x                               1x                               1x                               1x                               1x                               1x                  
import {
	Globe,
	Instagram,
	Facebook,
	Youtube,
	Building2,
	Linkedin,
	Twitter,
} from "lucide-react";
import { PinterestIcon } from "../icons/PinterestIcon";
import {
	Card,
	CardContent,
	CardHeader,
	CardTitle,
	CardDescription,
} from "../ui/card";
import { Input } from "../ui/input";
 
interface SocialLinksFormProps {
	instagramHandle: string;
	setInstagramHandle: (value: string) => void;
	facebookUrl: string;
	setFacebookUrl: (value: string) => void;
	youtubeUrl: string;
	setYoutubeUrl: (value: string) => void;
	googleBusinessUrl: string;
	setGoogleBusinessUrl: (value: string) => void;
	websiteUrl: string;
	setWebsiteUrl: (value: string) => void;
	linkedinUrl: string;
	setLinkedinUrl: (value: string) => void;
	twitterUrl: string;
	setTwitterUrl: (value: string) => void;
	pinterestUrl: string;
	setPinterestUrl: (value: string) => void;
}
 
export function SocialLinksForm({
	instagramHandle,
	setInstagramHandle,
	facebookUrl,
	setFacebookUrl,
	youtubeUrl,
	setYoutubeUrl,
	googleBusinessUrl,
	setGoogleBusinessUrl,
	websiteUrl,
	setWebsiteUrl,
	linkedinUrl,
	setLinkedinUrl,
	twitterUrl,
	setTwitterUrl,
	pinterestUrl,
	setPinterestUrl,
}: SocialLinksFormProps) {
	return (
		<Card>
			<CardHeader>
				<CardTitle className="flex items-center gap-2">
					<Globe className="h-5 w-5" />
					Social Media & Web Presence
				</CardTitle>
				<CardDescription>
					Connect your social profiles to build trust
				</CardDescription>
			</CardHeader>
			<CardContent className="space-y-4">
				<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
					<div className="space-y-2">
						<label
							htmlFor="instagram"
							className="text-sm font-medium text-foreground-default flex items-center gap-2"
						>
							<Instagram className="h-4 w-4 text-social-instagram" />
							Instagram Handle
						</label>
						<Input
							id="instagram"
							value={instagramHandle}
							onChange={(e) => setInstagramHandle(e.target.value)}
							placeholder="@yourhandle"
						/>
					</div>
 
					<div className="space-y-2">
						<label
							htmlFor="facebook"
							className="text-sm font-medium text-foreground-default flex items-center gap-2"
						>
							<Facebook className="h-4 w-4 text-social-facebook" />
							Facebook Page
						</label>
						<Input
							id="facebook"
							value={facebookUrl}
							onChange={(e) => setFacebookUrl(e.target.value)}
							placeholder="https://facebook.com/yourpage"
						/>
					</div>
 
					<div className="space-y-2">
						<label
							htmlFor="youtube"
							className="text-sm font-medium text-foreground-default flex items-center gap-2"
						>
							<Youtube className="h-4 w-4 text-social-youtube" />
							YouTube Channel
						</label>
						<Input
							id="youtube"
							value={youtubeUrl}
							onChange={(e) => setYoutubeUrl(e.target.value)}
							placeholder="https://youtube.com/@yourchannel"
						/>
					</div>
 
					<div className="space-y-2">
						<label
							htmlFor="google-business"
							className="text-sm font-medium text-foreground-default flex items-center gap-2"
						>
							<Building2 className="h-4 w-4 text-info" />
							Google Business Profile
						</label>
						<Input
							id="google-business"
							value={googleBusinessUrl}
							onChange={(e) => setGoogleBusinessUrl(e.target.value)}
							placeholder="https://g.page/yourbusiness"
						/>
					</div>
 
					<div className="space-y-2">
						<label
							htmlFor="website"
							className="text-sm font-medium text-foreground-default flex items-center gap-2"
						>
							<Globe className="h-4 w-4 text-foreground-muted" />
							Website
						</label>
						<Input
							id="website"
							value={websiteUrl}
							onChange={(e) => setWebsiteUrl(e.target.value)}
							placeholder="https://yourwebsite.com"
						/>
					</div>
 
					<div className="space-y-2">
						<label
							htmlFor="linkedin"
							className="text-sm font-medium text-foreground-default flex items-center gap-2"
						>
							<Linkedin className="h-4 w-4 text-social-linkedin" />
							LinkedIn
						</label>
						<Input
							id="linkedin"
							value={linkedinUrl}
							onChange={(e) => setLinkedinUrl(e.target.value)}
							placeholder="https://linkedin.com/company/yourcompany"
						/>
					</div>
 
					<div className="space-y-2">
						<label
							htmlFor="twitter"
							className="text-sm font-medium text-foreground-default flex items-center gap-2"
						>
							<Twitter className="h-4 w-4 text-social-twitter" />
							Twitter / X
						</label>
						<Input
							id="twitter"
							value={twitterUrl}
							onChange={(e) => setTwitterUrl(e.target.value)}
							placeholder="https://twitter.com/yourhandle"
						/>
					</div>
 
					<div className="space-y-2">
						<label
							htmlFor="pinterest"
							className="text-sm font-medium text-foreground-default flex items-center gap-2"
						>
							<PinterestIcon className="h-4 w-4 text-social-pinterest" />
							Pinterest
						</label>
						<Input
							id="pinterest"
							value={pinterestUrl}
							onChange={(e) => setPinterestUrl(e.target.value)}
							placeholder="https://pinterest.com/yourprofile"
						/>
					</div>
				</div>
			</CardContent>
		</Card>
	);
}