From 0091827e796a33e334f13599831723b396301f24 Mon Sep 17 00:00:00 2001 From: r8btx <60275558+r8btx@users.noreply.github.com> Date: Sun, 19 Nov 2023 23:07:23 -0500 Subject: [PATCH 1/4] Use env file for storing API key --- front-end/src/utils/mapUtility.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front-end/src/utils/mapUtility.js b/front-end/src/utils/mapUtility.js index c6882fb..5c70e00 100644 --- a/front-end/src/utils/mapUtility.js +++ b/front-end/src/utils/mapUtility.js @@ -35,7 +35,7 @@ const SIMPLE_MAP = [ ]; const API_BASE = 'https://maps.googleapis.com/maps/api/js'; -//const API_KEY = ''; +const API_KEY = process.env.REACT_APP_MAP_API_KEY; const API_LIBRARIES = ['geometry', 'places']; const CALLBACK_NAME = 'gmapAPICallback'; const POS_DEFAULT = [40.716503, -73.976077]; From 5c55313f71514adc464c3ed4102195c126fb07b6 Mon Sep 17 00:00:00 2001 From: r8btx <60275558+r8btx@users.noreply.github.com> Date: Sun, 19 Nov 2023 23:08:33 -0500 Subject: [PATCH 2/4] Create .env --- front-end/.env | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 front-end/.env diff --git a/front-end/.env b/front-end/.env new file mode 100644 index 0000000..8472ce9 --- /dev/null +++ b/front-end/.env @@ -0,0 +1,2 @@ +# Google Map API Key +REACT_APP_MAP_API_KEY=API_KEY_HERE From b9ed2e216ab31f22f889af81b760402084476388 Mon Sep 17 00:00:00 2001 From: r8btx <60275558+r8btx@users.noreply.github.com> Date: Sun, 19 Nov 2023 23:12:00 -0500 Subject: [PATCH 3/4] Rename .env to .env.local --- front-end/{.env => .env.local} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename front-end/{.env => .env.local} (100%) diff --git a/front-end/.env b/front-end/.env.local similarity index 100% rename from front-end/.env rename to front-end/.env.local From f9153c6c472af5184e738d3cc73926790b45481b Mon Sep 17 00:00:00 2001 From: r8btx <60275558+r8btx@users.noreply.github.com> Date: Sun, 19 Nov 2023 23:20:24 -0500 Subject: [PATCH 4/4] Delete front-end/.env.local --- front-end/.env.local | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 front-end/.env.local diff --git a/front-end/.env.local b/front-end/.env.local deleted file mode 100644 index 8472ce9..0000000 --- a/front-end/.env.local +++ /dev/null @@ -1,2 +0,0 @@ -# Google Map API Key -REACT_APP_MAP_API_KEY=API_KEY_HERE