feat: Initialize License Tracker Pro v1.2 project
Adds initial project structure, dependencies, and basic configuration for the License Tracker Pro v1.2 application. This includes setting up Vite for the build process, defining core types, and incorporating essential UI components like icons and a timeline. The project is now ready for development.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
|
||||
import React from 'react';
|
||||
import { License } from '../types';
|
||||
import LicenseItem from './LicenseItem';
|
||||
|
||||
interface LicenseListProps {
|
||||
licenses: License[];
|
||||
onEdit?: (license: License) => void;
|
||||
onDelete?: (id: string) => void;
|
||||
isReadOnly?: boolean;
|
||||
}
|
||||
|
||||
const LicenseList: React.FC<LicenseListProps> = ({ licenses, onEdit, onDelete, isReadOnly }) => {
|
||||
if (!licenses || licenses.length === 0) {
|
||||
return (
|
||||
<div className="text-center py-16 px-6 bg-slate-800 rounded-lg shadow-inner border border-slate-700">
|
||||
<h3 className="text-2xl font-bold text-gray-300">No licenses found.</h3>
|
||||
{!isReadOnly && <p className="text-gray-400 mt-2">Click "Add New License" to get started.</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
{licenses.map(license => (
|
||||
<LicenseItem
|
||||
key={license.id}
|
||||
license={license}
|
||||
onEdit={onEdit}
|
||||
onDelete={onDelete}
|
||||
isReadOnly={isReadOnly}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default LicenseList;
|
||||
Reference in New Issue
Block a user