fix: responsive in project details.

This commit is contained in:
charlesgauthereau
2026-01-11 10:59:42 +01:00
parent 419b6d4891
commit a03a1d635f
2 changed files with 36 additions and 13 deletions
@@ -8,6 +8,7 @@ import {
} from "@/components/wrappers/dashboard/projects/button-delete-project/delete-project.action";
import {useRouter} from "next/navigation";
import {toast} from "sonner";
import {useIsMobile} from "@/hooks/use-mobile";
export type ButtonDeleteProjectProps = {
text?: string;
@@ -16,6 +17,8 @@ export type ButtonDeleteProjectProps = {
export const ButtonDeleteProject = (props: ButtonDeleteProjectProps) => {
const router = useRouter();
const isMobile = useIsMobile()
const mutation = useMutation({
mutationFn: () => deleteProjectAction(props.projectId),
onSuccess: async (result: any) => {
@@ -35,7 +38,7 @@ export const ButtonDeleteProject = (props: ButtonDeleteProjectProps) => {
description="Are you sure you want to delete this project ? This action cannot be undone."
button={{
main: {
text: props.text ? props.text : "",
text: props.text ? !isMobile ? props.text: "" : "",
variant: "outline",
icon: <Trash2 color="red"/>,
},