"use client";

import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { Button } from "@/components/ui/button";

export default function NewMissionPage() {
  const router = useRouter();

  // Redirect to new mission form
  useEffect(() => {
    router.push("/missions/new");
  }, [router]);

  return (
    <div className="flex flex-col items-center justify-center h-full">
      <div className="animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-600 mb-4"></div>
      <p className="text-gray-500 mb-4">Redirection vers le formulaire de création de mission...</p>
      <Button 
        variant="outline" 
        onClick={() => router.push("/missions/new")}
      >
        Cliquez ici si vous n'êtes pas redirigé automatiquement
      </Button>
    </div>
  );
} 