|
2 | 2 |
|
3 | 3 | import { useEffect, useState } from "react"; |
4 | 4 | import { FollowerListSchema, FollowingListSchema } from "@/lib/types"; |
5 | | -import { Github, RotateCw} from "lucide-react"; |
| 5 | +import { Github } from "lucide-react"; |
6 | 6 | import ExtractNamesFromJson from "@/lib/extractNamesFromJson"; |
7 | 7 | import Compare from "@/lib/comparison"; |
8 | 8 | import HeroSection from "@/components/HeroSection"; |
| 9 | +import ResultsSection from "@/components/ResultsSection"; |
9 | 10 | export default function Home() { |
10 | 11 | const [followers, setFollowers] = useState<string[]>([]); |
11 | 12 | const [following, setFollowing] = useState<string[]>([]); |
@@ -75,33 +76,7 @@ export default function Home() { |
75 | 76 | {!hasProcessedDifference ? ( |
76 | 77 | <HeroSection onDrop={onDrop} hasProcessedFollowers={hasProcessedFollowers} hasProcessedFollowing={hasProcessedFollowing}></HeroSection> |
77 | 78 | ) : ( |
78 | | - <section className="flex flex-col items-center"> |
79 | | - <button |
80 | | - onClick={handleReset} |
81 | | - aria-label="Reset Button" |
82 | | - className="py-4 transform transition hover:rotate-90 cursor-pointer " |
83 | | - > |
84 | | - <RotateCw size={40}></RotateCw> |
85 | | - </button> |
86 | | - <p className="text-2xl mb-6 text-center"> |
87 | | - Accounts that don't follow you back - {userDifference.length} |
88 | | - </p> |
89 | | - |
90 | | - <ol className="flex flex-row flex-wrap container mx-auto gap-1.5 sm:gap-2.5 justify-center"> |
91 | | - {userDifference.map((userName) => ( |
92 | | - <li key={userName} aria-label={userName}> |
93 | | - <a |
94 | | - className="text-s m-1 inline-block rounded-full border-2 border-l-8 bg-slate-100 px-3 py-1 text-border cursor-pointer transition transform hover:scale-110" |
95 | | - href={`https://www.instagram.com/${userName}/`} |
96 | | - target="_blank" |
97 | | - rel="noopener noreferrer" |
98 | | - > |
99 | | - {userName} |
100 | | - </a> |
101 | | - </li> |
102 | | - ))} |
103 | | - </ol> |
104 | | - </section> |
| 79 | + <ResultsSection handleReset={handleReset} userDifference={userDifference}></ResultsSection> |
105 | 80 | )} |
106 | 81 | </main> |
107 | 82 |
|
|
0 commit comments