mirror of
https://github.com/tiennm99/ai-coding-workflow-labs.git
synced 2026-09-17 06:24:20 +00:00
feat(01-03): create PeopleList component
- Subscribes to store.people signal - Renders list of person names with unique keys - Shows empty state when no people added - Preact Signals auto-track dependencies in components
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { store } from '../../store/billStore.js';
|
||||
|
||||
export function PeopleList() {
|
||||
const people = store.people.value;
|
||||
|
||||
if (people.length === 0) {
|
||||
return <p class="empty-state">No people added yet</p>;
|
||||
}
|
||||
|
||||
return (
|
||||
<ul class="people-list">
|
||||
{people.map((person) => (
|
||||
<li key={person.id}>{person.name}</li>
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user