ContactPage.tsx 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import React from 'react';
  2. import { Link } from 'react-router-dom';
  3. import VirtualIdCard from './components/VirtualIdCard';
  4. import AuthenticityScore from './components/AuthenticityScore';
  5. import Bio from './components/Bio';
  6. import SocialLinks from './components/SocialLinks';
  7. import VideoIntroduction from './components/VideoIntroduction';
  8. import type { ContactData } from './types';
  9. interface ContactPageProps {
  10. data: ContactData;
  11. }
  12. const ContactPage: React.FC<ContactPageProps> = ({ data }) => {
  13. const totalScore = data.authenticityScore.videoVerification + data.authenticityScore.socialBinding + data.authenticityScore.cloneMaturity;
  14. return (
  15. <main className="max-w-3xl mx-auto p-4 sm:p-6 md:p-8">
  16. <div className="space-y-8">
  17. <div className="flex justify-between items-center mb-4">
  18. <h1 className="text-2xl font-bold text-slate-800">Contact Profile</h1>
  19. <div>
  20. <Link to="/" className="text-sm text-slate-600 hover:text-blue-600 mr-4">Home</Link>
  21. <Link to="/edit" className="px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700">Edit Page</Link>
  22. </div>
  23. </div>
  24. <VirtualIdCard
  25. name={data.name}
  26. avatarUrl={data.avatarUrl}
  27. virtualId={data.virtualId}
  28. totalScore={totalScore}
  29. />
  30. <AuthenticityScore
  31. videoVerificationScore={data.authenticityScore.videoVerification}
  32. socialBindingScore={data.authenticityScore.socialBinding}
  33. cloneMaturityScore={data.authenticityScore.cloneMaturity}
  34. />
  35. <Bio text={data.bio} />
  36. <VideoIntroduction
  37. videoUrl={data.videoIntroUrl}
  38. posterUrl={data.videoPosterUrl}
  39. />
  40. <SocialLinks links={data.socials} />
  41. </div>
  42. </main>
  43. );
  44. };
  45. export default ContactPage;