-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Green: Switch purchase time to timestamp (todos)
- update firebase sample data - test that playwright tests didn't get 10x as slow, and that that's really just my laptop battery
- Loading branch information
1 parent
2b58c6e
commit 06266d9
Showing
11 changed files
with
128 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export const logInfo = (msg: String) => { | ||
console.log("🧿 // " + msg); | ||
}; | ||
|
||
export const logDebug = (msg: String) => { | ||
console.log("⚙️ // " + msg); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { format, parse } from "date-fns"; | ||
import { Timestamp } from "firebase/firestore"; | ||
|
||
export const datetimeStringFormat = "yyyy-MM-dd'T'HH:mm"; | ||
|
||
export const dateToDatetimeString = (date: Date) => | ||
format(date, datetimeStringFormat); | ||
|
||
export const initialDatetimeString = dateToDatetimeString(new Date()); | ||
|
||
export const datetimeToTimestamp = (datetime: string) => | ||
Timestamp.fromDate(parse(datetime, datetimeStringFormat, new Date())); | ||
|
||
export const timestampToDatetimeString = (timestamp: Timestamp) => | ||
format(timestamp.toDate(), datetimeStringFormat); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.