Skip to content

Commit 7af9aea

Browse files
committed
Show strikethrough for completed tasks
* Show strikethrough for completed tasks * Implement automatic switch between local and production API
1 parent e22bed7 commit 7af9aea

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"tabWidth": 4,
3-
"useTabs": true
3+
"useTabs": true,
4+
"arrowParens": "avoid"
45
}

components/Jotting/jotting.module.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,14 @@
7979
grid-column-end: 4;
8080
}
8181

82-
.task .details {
82+
.details {
8383
grid-column-end: 3;
8484
}
8585

86+
.jotting .completed {
87+
text-decoration-line: line-through;
88+
}
89+
8690
.subtasksControl {
8791
grid-row: 3;
8892
grid-column: 3 / 5;

libs/Datastore/BorumJotRequest.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import BorumRequest from "./BorumRequest";
22

33
export default class BorumJotRequest extends BorumRequest {
44
static initialize(input: RequestInfo, init?: RequestInit) {
5-
return new BorumJotRequest(`https://api.jot.borumtech.com/api/v1/${input}`, init);
6-
// return new BorumJotRequest(`http://localhost:8200/v1/${input}`, init);
5+
if (window.location.hostname === "localhost") {
6+
return new BorumJotRequest(`http://localhost:8200/v1/${input}`, init);
7+
} else {
8+
return new BorumJotRequest(`https://api.jot.borumtech.com/api/v1/${input}`, init);
9+
}
710
}
811
}

0 commit comments

Comments
 (0)