MCPcopy Create free account
hub / github.com/Muhammadsiddiq-code/Admin-dashboard / initializeData

Function initializeData

app.js:1053–1063  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1051
1052// Initialize data in localStorage if not exists
1053function initializeData() {
1054 if (!localStorage.getItem("studentsData")) {
1055 localStorage.setItem("studentsData", JSON.stringify(sampleData.students))
1056 }
1057 if (!localStorage.getItem("teachersData")) {
1058 localStorage.setItem("teachersData", JSON.stringify(sampleData.teachers))
1059 }
1060 if (!localStorage.getItem("newsData")) {
1061 localStorage.setItem("newsData", JSON.stringify(sampleData.news))
1062 }
1063}
1064
1065// Load data from localStorage
1066function loadDataFromStorage() {

Callers 1

app.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected