fun improvements (#1)
Some checks failed
Build and Deploy Blog / build-and-deploy-local (push) Failing after 11s

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2026-03-31 00:50:16 +00:00
parent 902521e1f3
commit 1ba5ee1b41
13 changed files with 424 additions and 66 deletions

View File

@@ -0,0 +1,25 @@
"use client";
import { useRouter } from "next/navigation";
export default function GoBackButton() {
const router = useRouter();
const handleBack = () => {
if (window.history.length > 1) {
router.back();
} else {
router.push("/");
}
};
return (
<button
onClick={handleBack}
aria-label="Go back to previous page"
className="px-4 py-1.5 text-sm bg-gradient-to-b from-blue-100 to-blue-200 border border-blue-300 rounded hover:from-blue-200 hover:to-blue-300 transition-colors"
>
Go Back
</button>
);
}