This commit is contained in:
QkoSad
2023-08-08 16:02:54 +03:00
commit 0a7a469d56
315 changed files with 426907 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
import { DiaryEntry } from "../src/types";
import toNewDiaryEntry from "../src/utils";
const data = [
{
"id": 1,
"date": "2017-01-01",
"weather": "rainy",
"visibility": "poor",
"comment": "Pretty scary flight, I'm glad I'm alive"
},
{
"id": 2,
"date": "2017-04-01",
"weather": "sunny",
"visibility": "good",
"comment": "Everything went better than expected, I'm learning much"
},
{
"id": 3,
"date": "2017-04-15",
"weather": "windy",
"visibility": "good",
"comment": "I'm getting pretty confident although I hit a flock of birds"
},
{
"id": 4,
"date": "2017-05-11",
"weather": "cloudy",
"visibility": "good",
"comment": "I almost failed the landing but I survived"
}
];
const diaryEntries: DiaryEntry [] = data.map(obj => {
const object = toNewDiaryEntry(obj) as DiaryEntry;
object.id = obj.id;
return object;
});
export default diaryEntries;