put create and delete header-language request uz

This commit is contained in:
Samandar Turgunboyev
2025-11-12 13:53:30 +05:00
parent 64f8467f41
commit e09ec2b7d5
2 changed files with 14 additions and 6 deletions

View File

@@ -247,7 +247,7 @@ const StepOne = ({
},
});
const { mutate: update } = useMutation({
const { mutate: update, isPending: updatePending } = useMutation({
mutationFn: ({ body, id }: { id: number; body: FormData }) => {
return updateTours({ body, id });
},
@@ -2204,7 +2204,11 @@ const StepOne = ({
type="submit"
className="mt-6 px-8 py-3 bg-blue-600 text-white rounded-md hover:bg-blue-600 cursor-pointer"
>
{isPending ? <Loader2 className="animate-spin" /> : t("Saqlash")}
{isPending || updatePending ? (
<Loader2 className="animate-spin" />
) : (
t("Saqlash")
)}
</Button>
</div>
</form>