2019-04-19 16:22:14 +03:00
|
|
|
// Test .wasp file.
|
|
|
|
|
2019-05-05 18:54:51 +03:00
|
|
|
// App definition.
|
2019-04-19 16:22:14 +03:00
|
|
|
app test_app {
|
|
|
|
// Title of the app.
|
|
|
|
title: "Hello World!"
|
|
|
|
}
|
2019-05-05 18:54:51 +03:00
|
|
|
|
|
|
|
// Page definition.
|
|
|
|
page Landing {
|
2019-05-31 20:35:50 +03:00
|
|
|
route: "/",
|
2019-05-24 01:18:37 +03:00
|
|
|
content: {=jsx
|
2019-05-31 20:46:37 +03:00
|
|
|
<div>
|
|
|
|
My landing page! I have { this.props.taskList.length } tasks.
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<TaskCreateForm
|
|
|
|
onCreate={task => this.props.addTask(task)}
|
|
|
|
submitButtonLabel={'Create new task'}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-05-31 20:35:50 +03:00
|
|
|
jsx=}
|
|
|
|
}
|
|
|
|
|
|
|
|
page TestPage {
|
|
|
|
route: "/test",
|
|
|
|
content: {=jsx
|
|
|
|
<div>This is a test page!</div>
|
2019-05-24 01:18:37 +03:00
|
|
|
jsx=}
|
2019-05-05 18:54:51 +03:00
|
|
|
}
|
2019-05-09 23:05:59 +03:00
|
|
|
|
|
|
|
// Entity definition.
|
|
|
|
entity Task {
|
|
|
|
description :: string,
|
|
|
|
isDone :: boolean
|
|
|
|
}
|