Skip to content

Commit 0cc6fd4

Browse files
committed
modified index.ts
1 parent 2aed9d9 commit 0cc6fd4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/index.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
import { UserEdit } from "./views/UserEdit";
2+
import { User } from "./models/User";
3+
4+
const user = User.buildUser({ name: "Pippa", age: 18 });
5+
6+
const root = document.querySelector("#root");
7+
8+
if (root) {
9+
const userEdit = new UserEdit(root, user);
10+
userEdit.render();
11+
12+
console.log(userEdit);
13+
} else {
14+
throw new Error("Root element not found");
15+
}
16+
17+
18+
/*
19+
120
import { UserList } from "./views/UserList";
221
import { Collection } from "./models/Collection";
322
import { UserProps, User } from "./models/User";
@@ -17,3 +36,5 @@ users.on("change", () => {
1736
}
1837
});
1938
users.fetch();
39+
40+
*/

0 commit comments

Comments
 (0)