import { useNavigate, useParams } from '@solidjs/router';
import { onMount } from 'solid-js';

export default function EditRoleUiConfigRedirectPage() {
  const navigate = useNavigate();
  const params = useParams();

  onMount(() => {
    const roleKey = encodeURIComponent(params.roleKey || '');
    navigate(`/admin/external-dashboard-management?roleKey=${roleKey}`, { replace: true });
  });

  return (
      <section class="rounded-xl border border-gray-200 bg-white shadow-sm">
        <p class="notice">Redirecting to External Dashboard Management...</p>
      </section>
  );
}
