Browse Source

refactor sample data

AykutSarac 2 years ago
parent
commit
e72ffd7c4c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/constants/data.ts

+ 3 - 1
src/constants/data.ts

@@ -1,7 +1,7 @@
 export const baseURL = process.env.NEXT_PUBLIC_BASE_URL;
 export const baseURL = process.env.NEXT_PUBLIC_BASE_URL;
 
 
 // Example taken from https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json
 // Example taken from https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json
-export const defaultJson = JSON.stringify({
+const sampleJson = Object.freeze({
   squadName: "Super hero squad",
   squadName: "Super hero squad",
   homeTown: "Metro City",
   homeTown: "Metro City",
   formed: 2016,
   formed: 2016,
@@ -38,3 +38,5 @@ export const defaultJson = JSON.stringify({
     },
     },
   ],
   ],
 });
 });
+
+export const defaultJson = JSON.stringify(sampleJson, null, 2);