refactor(back-button): relocate and rename back button component

- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
This commit is contained in:
cfngc4594 2025-05-13 16:43:01 +08:00
parent ad8a3e646e
commit 9766dea138

View File

@ -10,12 +10,12 @@ import { useTranslations } from "next-intl";
import { ArrowLeftIcon } from "lucide-react";
import { Button } from "@/components/ui/button";
interface NavigateBackButtonProps {
interface BackButtonProps {
href: string;
className?: string;
}
const NavigateBackButton = ({ href, className }: NavigateBackButtonProps) => {
export const BackButton = ({ href, className }: BackButtonProps) => {
const t = useTranslations();
return (
@ -39,5 +39,3 @@ const NavigateBackButton = ({ href, className }: NavigateBackButtonProps) => {
</TooltipProvider>
);
};
export { NavigateBackButton };