Sha256: af37a1ab0183bdb2793c25b21c4ed37a621f010bd4e0441c5d96e7b0e271669c

Contents?: true

Size: 1.21 KB

Versions: 25

Compression:

Stored size: 1.21 KB

Contents

import React, { useState } from 'react';
import { Code2 } from 'lucide-react';
import { mockDatasets, mockFeatureGroups } from '../mockData';
import { FeatureForm } from '../components/features/FeatureForm';

export default function NewFeaturePage() {
  const navigate = useNavigate();
  const [formData, setFormData] = useState({
    name: '',
    description: '',
    groupId: '',
    testDatasetId: '',
    inputColumns: [] as string[],
    outputColumns: [] as string[],
    code: ''
  });

  const handleSubmit = (data: typeof formData) => {
    console.log('Creating new feature:', data);
    navigate('/features');
  };

  return (
    <div className="max-w-4xl mx-auto p-8">
      <div className="bg-white rounded-lg shadow-lg">
        <div className="px-6 py-4 border-b border-gray-200">
          <div className="flex items-center gap-3">
            <Code2 className="w-6 h-6 text-blue-600" />
            <h2 className="text-xl font-semibold text-gray-900">New Feature</h2>
          </div>
        </div>

        <FeatureForm
          datasets={mockDatasets}
          groups={mockFeatureGroups}
          onSubmit={handleSubmit}
          onCancel={() => navigate('/features')}
        />
      </div>
    </div>
  );
}

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
easy_ml-0.2.0.pre.rc27 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc26 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc25 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc24 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc23 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc22 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc21 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc20 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc19 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc18 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc17 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc16 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc15 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc14 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc13 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc12 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc11 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc10 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc9 app/frontend/pages/NewTransformationPage.tsx
easy_ml-0.2.0.pre.rc8 app/frontend/pages/NewTransformationPage.tsx