8000 Merge pull request #1 from folz/folz/format · homebaseio/homebase-react@9a1dcc0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a1dcc0

Browse files
authored
Merge pull request #1 from folz/folz/format
chore: Code style cleanups
2 parents 7e1d582 + b474241 commit 9a1dcc0

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

examples/counter-example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/todo-example/src/App.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const config = {
2525
}, {
2626
user: {
2727
// negative numbers can be used as temporary ids in a transaction
28-
id: -1,
29-
name: 'Stella'
28+
id: -1,
29+
name: 'Stella'
3030
}
3131
}, {
3232
user: {
@@ -80,16 +80,16 @@ const NewTodo = () => {
8080
transact([{
8181
todo: {
8282
name: e.target.elements['todo-name'].value,
83-
createdAt: new Date
83+
createdAt: new Date()
8484
}
8585
}])
8686
e.target.reset()
8787
}}>
88-
<input
88+
<input
8989
autoFocus
90-
type="text"
91-
name="todo-name"
92-
placeholder="What needs to be done?"
90+
type="text"
91+
name="todo-name"
92+
placeholder="What needs to be done?"
9393
autoComplete="off"
9494
required
9595
/>
@@ -105,8 +105,8 @@ const TodoFilters = () => {
105105
return (
106106
<div>
107107
<label htmlFor="show-completed">Show Completed?</label>
108-
<input
109-
type="checkbox"
108+
<input
109+
type="checkbox"
110110
id="show-completed"
111111
checked={filters.get('showCompleted')}
112112
onChange={e => transact([{ todoFilter: { id: filters.get('id'), showCompleted: e.target.checked }}])}
@@ -131,15 +131,15 @@ const ProjectSelect = ({ value, onChange }) => {
131131
Project:
132132
</label>
133133
&nbsp;
134-
<select
135-
name="projects"
134+
<select
135+
name="projects"
136136
value={value}
137137
onChange={e => onChange && onChange(Number(e.target.value))}
138138
>
139139
<option value="0"></option>
140140
{projects.map(project => (
141-
<option
142-
key={project.get('id')}
141+
<option
142+
key={project.get('id')}
143143
value={project.get('id')}
144144
>
145145
{project.get('name')}
@@ -192,13 +192,13 @@ const Todo = ({ todo }) => (
192192
const TodoCheck = ({ todo }) => {
193193
const [transact] = useTransact()
194194
return (
195-
<input
195+
<input
196196
type="checkbox"
197197
style={{ width: 20, height: 20, cursor: 'pointer' }}
198198
checked={!!todo.get('isCompleted')}
199-
onChange={e => transact([{
199+
onChange={e => transact([{
200200
todo: {
201-
id: todo.get('id'),
201+
id: todo.get('id'),
202202
isCompleted: e.target.checked
203203
}
204204
}])}
@@ -209,8 +209,8 @@ const TodoCheck = ({ todo }) => {
209209
const TodoName = ({ todo }) => {
210210
const [transact] = useTransact()
211211
return (
212-
<input
213-
style={{
212+
<input
213+
style={{
214214
border: 'none', fontSize: 20, marginTop: -2, cursor: 'pointer',
215215
...todo.get('isCompleted') && { textDecoration: 'line-through '}
216216
}}
@@ -226,7 +226,7 @@ const TodoProject = ({ todo }) => {
226226
<ProjectSelect
227227
value={todo.get('project', 'id') || ''}
228228
onChange={projectId => transact([{ todo: { id: todo.get('id'), 'project': projectId || null }}])}
229-
/>
229+
/>
230230
)
231231
}
232232

@@ -242,15 +242,15 @@ const TodoOwner = ({ todo }) => {
242242
Owner:
243243
</label>
244244
&nbsp;
245-
<select
246-
name="users"
245+
<select
246+
name="users"
247247
value={todo.get('owner', 'id') || ''}
248248
onChange={e => transact([{ todo: { id: todo.get('id'), owner: Number(e.target.value) || null }}])}
249249
>
250250
<option value=""></option>
251251
{users.map(user => (
252-
<option
253-
key={user.get('id')}
252+
<option
253+
key={user.get('id')}
254254
value={user.get('id')}
255255
>
256256
{user.get('name')}

0 commit comments

Comments
 (0)
0