Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/(public)/(auth)/reset-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default async function ResetPassword() {
href="/"
className="flex items-center gap-3 w-fit hover:opacity-80 transition"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<span className="text-2xl font-bold tracking-tight text-gray-900">
Devpulse
</span>
Expand Down Expand Up @@ -126,7 +126,7 @@ export default async function ResetPassword() {
href="/"
className="lg:hidden flex items-center justify-center gap-3 mb-10"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<h2 className="text-3xl font-bold text-gray-900">Devpulse</h2>
</Link>

Expand Down
2 changes: 1 addition & 1 deletion app/(public)/flex/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default async function Flexs() {
<BackButton href="/" />

<div className="flex justify-center items-center gap-3 mb-8">
<Image src="/logo.svg" alt="Devpulse Logo" width={36} height={36} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={36} height={36} />
<h1 className="text-3xl font-bold text-gray-900">Devpulse Flexes</h1>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/(public)/join/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default async function JoinPage({ searchParams }: Props) {
<div className="glass-card max-w-lg w-full p-8 md:p-10 text-center">
<div className="flex justify-center mb-6">
<div className="w-16 h-16 rounded-2xl bg-blue-50 border border-blue-500/20 flex items-center justify-center shadow-[0_0_30px_rgba(99,102,241,0.15)]">
<Image src="/logo.svg" alt="Devpulse" width={36} height={36} />
<Image src="/apple-touch-icon.png" alt="Devpulse" width={36} height={36} />
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/(public)/leaderboard/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default async function LeaderboardPage(props: {
<div className="w-20 h-20 sm:w-28 sm:h-28 rounded-2xl bg-white p-1.5 sm:p-2 shadow-2xl shrink-0">
<div className="w-full h-full rounded-xl bg-[#121226] border border-gray-200 flex items-center justify-center overflow-hidden relative">
<Image
src="/logo.svg"
src="/apple-touch-icon.png"
alt="Devpulse Logo"
width={40}
height={40}
Expand Down
2 changes: 1 addition & 1 deletion app/(public)/leaderboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default async function Leaderboards() {
<BackButton href="/leaderboards" />

<div className="flex justify-center items-center gap-3 mb-8">
<Image src="/logo.svg" alt="Devpulse Logo" width={36} height={36} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={36} height={36} />
<h1 className="text-3xl font-bold text-gray-900">
Devpulse Leaderboards
</h1>
Expand Down
4 changes: 2 additions & 2 deletions app/components/auth/ForgotPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function ForgotPassword() {
href="/"
className="flex items-center gap-3 w-fit hover:opacity-80 transition"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<span className="text-2xl font-bold tracking-tight text-white">
Devpulse
</span>
Expand Down Expand Up @@ -95,7 +95,7 @@ export default function ForgotPassword() {
href="/"
className="lg:hidden flex items-center justify-center gap-3 mb-10"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<h2 className="text-3xl font-bold text-gray-900">Devpulse</h2>
</Link>

Expand Down
4 changes: 2 additions & 2 deletions app/components/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function Login() {
href="/"
className="flex items-center gap-3 w-fit hover:opacity-80 transition"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<span className="text-2xl font-bold tracking-tight text-white">
Devpulse
</span>
Expand Down Expand Up @@ -94,7 +94,7 @@ export default function Login() {
href="/"
className="lg:hidden flex items-center justify-center gap-3 mb-10"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<h2 className="text-3xl font-bold">Devpulse</h2>
</Link>

Expand Down
4 changes: 2 additions & 2 deletions app/components/auth/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function Signup() {
href="/"
className="flex items-center gap-3 w-fit hover:opacity-80 transition"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<span className="text-2xl font-bold tracking-tight text-white">
Devpulse
</span>
Expand Down Expand Up @@ -94,7 +94,7 @@ export default function Signup() {
href="/"
className="lg:hidden flex items-center justify-center gap-3 mb-10"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<h2 className="text-3xl font-bold text-gray-900">Devpulse</h2>
</Link>

Expand Down
6 changes: 3 additions & 3 deletions app/components/auth/VerifyEmail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function VerifyEmail({
error: "Failed to resend. Please try again.",
});

verifyEmailPromise.then(() => {
verifyEmailPromise.finally(() => {
setLoading(false);
});
};
Expand All @@ -91,7 +91,7 @@ export default function VerifyEmail({
href="/"
className="flex items-center gap-3 w-fit hover:opacity-80 transition"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<span className="text-2xl font-bold tracking-tight text-white">
Devpulse
</span>
Expand Down Expand Up @@ -157,7 +157,7 @@ export default function VerifyEmail({
href="/"
className="lg:hidden flex items-center justify-center gap-3 mb-10"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<h2 className="text-3xl font-bold text-gray-900">Devpulse</h2>
</Link>

Expand Down
21 changes: 11 additions & 10 deletions app/components/auth/VerifyWakatime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,22 @@ export default function VerifyWakatime() {

toast.promise(verifyWakatimePromise, {
pending: "Verifying...",
success: {
render() {
router.push("/d");

return "Verification successful!";
},
},
success: "Verification successful!",
error: {
render({ data }) {
setLoading(false);
const err = data as Error;
return err?.message || "Failed to verify. Please try again.";
},
},
});

verifyWakatimePromise
.then(() => {
router.push("/d");
})
.finally(() => {
setLoading(false);
});
};

return (
Expand All @@ -85,7 +86,7 @@ export default function VerifyWakatime() {
href="/"
className="flex items-center gap-3 w-fit hover:opacity-80 transition"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<span className="text-2xl font-bold tracking-tight text-white">
Devpulse
</span>
Expand Down Expand Up @@ -151,7 +152,7 @@ export default function VerifyWakatime() {
href="/"
className="lg:hidden flex items-center justify-center gap-3 mb-10"
>
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
<Image src="/apple-touch-icon.png" alt="Devpulse Logo" width={40} height={40} />
<h2 className="text-3xl font-bold text-gray-900">Devpulse</h2>
</Link>

Expand Down
11 changes: 7 additions & 4 deletions app/components/auth/form/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,19 @@ export default function LoginForm() {
success: "Login successful! Redirecting...",
error: {
render({ data }) {
setLoading(false);
const err = data as Error;
return err?.message || "Failed to login. Please try again.";
},
},
});

loginPromise.then(() => {
router.push(redirectTo);
});
loginPromise
.then(() => {
router.push(redirectTo);
})
.finally(() => {
setLoading(false);
});
};

return (
Expand Down
22 changes: 10 additions & 12 deletions app/components/auth/form/ResetPasswordForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,24 @@ export default function ResetPasswordForm() {

toast.promise(updatePasswordPromise, {
pending: "Resetting password...",
success: {
render() {
setLoading(false);
setPassword("");
setConfirmPassword("");
return "Password updated! You can log in now.";
},
},
success: "Password updated! You can log in now.",
error: {
render({ data }) {
setLoading(false);
const err = data as Error;
return err?.message || "Failed to reset password. Please try again.";
},
},
});

updatePasswordPromise.then(() => {
router.replace("/login");
});
updatePasswordPromise
.then(() => {
setPassword("");
setConfirmPassword("");
router.replace("/login");
})
.finally(() => {
setLoading(false);
});
};

return (
Expand Down
18 changes: 9 additions & 9 deletions app/components/auth/form/SignupForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,22 @@ export default function SignupForm() {

toast.promise(signUp, {
pending: "Creating account...",
success: {
render() {
setLoading(false);
router.push(`/verify-email?email=${encodeURIComponent(email)}`);

return "Please check your email to verify your account.";
},
},
success: "Please check your email to verify your account.",
error: {
render({ data }) {
setLoading(false);
const err = data as Error;
return err?.message || "Failed to sign up. Please try again.";
},
},
});

signUp
.then(() => {
router.push(`/verify-email?email=${encodeURIComponent(email)}`);
})
.finally(() => {
setLoading(false);
});
};

return (
Expand Down
12 changes: 5 additions & 7 deletions app/components/auth/form/UpdatePasswordForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,18 @@ export default function UpdatePasswordForm() {

toast.promise(updateUserPasswordPromise, {
pending: "Updating password...",
success: {
render() {
setLoading(false);
return "Password updated!";
},
},
success: "Password updated!",
error: {
render({ data }) {
setLoading(false);
const err = data as Error;
return err?.message || "Failed to update password. Please try again.";
},
},
});

updateUserPasswordPromise.finally(() => {
setLoading(false);
});
};

return (
Expand Down
4 changes: 2 additions & 2 deletions app/components/common/NavProfileDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function NavProfileDropdown({
</div>

<Link
href="/d/logout"
href="/logout"
className={`${type === "sidebar" ? "flex" : "hidden"} items-center gap-2 px-4 py-2 text-sm text-red-600 hover:text-red-700 hover:bg-red-50 transition-colors mt-1 rounded`}
onClick={() => setProfileOpen(false)}
>
Expand Down Expand Up @@ -144,7 +144,7 @@ export default function NavProfileDropdown({

{type === "navbar" && (
<Link
href="/d/logout"
href="/logout"
className="w-full flex items-center gap-2 px-4 py-2 text-sm text-red-600 hover:text-red-700 hover:bg-red-50 transition-colors mt-1"
onClick={() => setProfileOpen(false)}
>
Expand Down
2 changes: 1 addition & 1 deletion app/components/dashboard/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export default function DashboardLayout({
>
<div className="h-16 px-4 flex items-center justify-between border-b border-gray-200">
<div className="flex items-center gap-2">
<Image src="/logo.svg" alt="Devpulse" width={22} height={22} />
<Image src="/apple-touch-icon.png" alt="Devpulse" width={22} height={22} />
<span className="text-sm font-semibold">Devpulse</span>
</div>
</div>
Expand Down
18 changes: 10 additions & 8 deletions app/components/dashboard/Settings/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function UserProfile({ user }: { user: UserShape }) {
const [loading, setLoading] = useState(false);
const [isEditing, setIsEditing] = useState(false);
const { badWords } = useBadWords();
const preferredAvatar = user.image || "/logo.svg";
const preferredAvatar = user.image || "/apple-touch-icon.png";

const isEdited = name.trim() !== originalName.trim();

Expand Down Expand Up @@ -65,19 +65,21 @@ export default function UserProfile({ user }: { user: UserShape }) {
success: "Profile updated!",
error: {
render({ data }) {
setLoading(false);
const err = data as Error;
return err?.message || "Failed to update profile. Please try again.";
},
},
});

updateUserProfile.then(() => {
setLoading(false);
setOriginalName(sanitizedName);
setName(sanitizedName);
setIsEditing(false);
});
updateUserProfile
.then(() => {
setOriginalName(sanitizedName);
setName(sanitizedName);
setIsEditing(false);
})
.finally(() => {
setLoading(false);
});
}

return (
Expand Down
12 changes: 5 additions & 7 deletions app/components/dashboard/Settings/ResetPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,20 @@ export default function ResetPassword({ email }: { email: string }) {

toast.promise(resetUserPasswordPromise, {
pending: "Sending reset email...",
success: {
render() {
setLoading(false);
return "Reset email sent!";
},
},
success: "Reset email sent!",
error: {
render({ data }) {
setLoading(false);
const err = data as Error;
return (
err?.message || "Failed to send reset email. Please try again."
);
},
},
});

resetUserPasswordPromise.finally(() => {
setLoading(false);
});
};

return (
Expand Down
Loading