Created
August 18, 2021 09:29
-
-
Save ul/9a11b270ea1e64ed5ceec67afe32648e to your computer and use it in GitHub Desktop.
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
const backendData = [ | |
{ | |
id: "1", | |
name: "Office Map" | |
}, | |
{ | |
id: "2", | |
name: "New Employee Onboarding", | |
children: [ | |
{ | |
id: "8", | |
name: "Onboarding Materials" | |
}, | |
{ | |
id: "9", | |
name: "Training" | |
} | |
] | |
}, | |
{ | |
id: "3", | |
name: "Office Events", | |
children: [ | |
{ | |
id: "6", | |
name: "2018", | |
children: [ | |
{ | |
id: "10", | |
name: "Summer Picnic" | |
}, | |
{ | |
id: "11", | |
name: "Valentine's Day Party" | |
}, | |
{ | |
id: "12", | |
name: "New Year's Party" | |
} | |
] | |
}, | |
{ | |
id: "7", | |
name: "2017", | |
children: [ | |
{ | |
id: "13", | |
name: "Company Anniversary Celebration" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
id: "4", | |
name: "Public Holidays" | |
}, | |
{ | |
id: "5", | |
name: "Vacations and Sick Leaves" | |
} | |
]; | |
function fetchData() { | |
return new Promise(resolve => { | |
setTimeout(resolve, 100, backendData); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment