Skip to content

Commit c7e99a4

Browse files
committed
fix(about): default about fallback issue
1 parent 55ce52f commit c7e99a4

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

www/app/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ export default async function Home() {
175175
<div className="container mx-auto px-4">
176176
<div className="max-w-3xl mx-auto">
177177
<AnimatedStats
178-
value={2050}
179-
subtitle="Profiles Generated in 2 Months from Around the Globe"
178+
value={6010}
179+
subtitle="Profiles Generated in 8 Months from Around the Globe"
180180
/>
181181
</div>
182182
</div>

www/components/ProfileSection.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ export async function ProfileSection({
5757
});
5858
}
5959

60-
await addUserToSupabase(user, urlSearchParams);
60+
// Run Supabase call in background without blocking UI
61+
addUserToSupabase(user, urlSearchParams).catch((error) => {
62+
console.error('Background analytics call failed:', error);
63+
});
6164

6265
if (!user) return <ProfileSkeleton />;
6366

www/components/github-modal/client.tsx

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,27 @@ export default function GitHubModal({ onClose }: GitHubModalProps) {
4343
const router = useRouter();
4444
const [loading, setLoading] = useState(false);
4545

46-
const redirectToProfilePage = async () => {
46+
const redirectToProfilePage = () => {
4747
if (!profile) return;
4848
setLoading(true);
49-
await router.push(`/${profile?.login}?ref=modal`);
49+
50+
// Get current search params and preserve them
51+
const currentParams = new URLSearchParams(window.location.search);
52+
currentParams.set('ref', 'modal');
53+
54+
// Use window.location for instant navigation
55+
window.location.href = `/${profile?.login}?${currentParams.toString()}`;
56+
};
5057

51-
// no need to setLoading(false) because navigation will replace this page
58+
const redirectToProfilePageFromCard = () => {
59+
if (!profile) return;
60+
61+
// Get current search params and preserve them
62+
const currentParams = new URLSearchParams(window.location.search);
63+
currentParams.set('ref', 'modelv2');
64+
65+
// Use window.location for instant navigation
66+
window.location.href = `/${profile?.login}?${currentParams.toString()}`;
5267
};
5368
// Debounce the username input to prevent excessive API calls
5469
const debouncedUsername = useDebounce(username, 500);
@@ -152,7 +167,8 @@ export default function GitHubModal({ onClose }: GitHubModalProps) {
152167
<motion.div
153168
initial={{ opacity: 0, y: 10 }}
154169
animate={{ opacity: 1, y: 0 }}
155-
className="bg-gray-50 rounded-lg p-4 flex items-center gap-4"
170+
onClick={redirectToProfilePageFromCard}
171+
className="bg-gray-50 rounded-lg p-4 flex items-center gap-4 cursor-pointer hover:bg-gray-100 transition-colors"
156172
>
157173
<Image
158174
src={profile.avatar_url}

www/components/profile-card/client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function ProfileCardClient({
4141
<p className="text-gray-600 text-sm mb-2 truncate">@{username}</p>
4242
<p className="text-gray-600 text-sm mb-3 line-clamp-2">{bio}</p>
4343

44-
<a href={`/${username}`} target="_blank" rel="noopener noreferrer">
44+
<a href={`/${username}?utm_source=devb_io&utm_medium=contributor&utm_campaign=devb_io`} target="_blank" rel="noopener noreferrer">
4545
<motion.button
4646
whileHover={{ scale: 1.05 }}
4747
whileTap={{ scale: 0.95 }}

0 commit comments

Comments
 (0)