Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
thecybernanny-webapp
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
asranov0003
thecybernanny-webapp
Commits
496258f4
Commit
496258f4
authored
Jul 30, 2025
by
asranov0003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add google map api key to maps
parent
50a5bafd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
constants.ts
src/constants/constants.ts
+1
-1
Home.tsx
src/pages/Home/Home.tsx
+4
-0
Routes.tsx
src/pages/Routes/Routes.tsx
+4
-0
No files found.
src/constants/constants.ts
View file @
496258f4
export
const
API_URL
=
"https://cabinet.thecybernanny.com/nanny/backend/rpc"
;
// PROD
// export const API_URL = "https://cabinet.dev.thecybernanny.com/nanny/backend/rpc"; // DEV
export
const
GOOGLE_MAPS_API_KEY
=
"AIzaSy
ABfhzIz1S4kpWvIMtsDD6XIjo2F7r-mTs
"
;
export
const
GOOGLE_MAPS_API_KEY
=
"AIzaSy
CFr9A8pyaitvVi2r1C08H0Zj1do0v0RKc
"
;
export
const
TG_USER_ID
=
window
.
Telegram
.
WebApp
.
initDataUnsafe
?.
user
?.
id
||
0
;
export
const
TOKEN
=
localStorage
.
getItem
(
`token-
${
TG_USER_ID
}
`
)
||
""
;
src/pages/Home/Home.tsx
View file @
496258f4
...
...
@@ -27,6 +27,7 @@ import GoogleMapReact from "google-map-react";
import
CMarker
from
"../../components/CMarker/CMarker"
;
import
CModal
from
"../../components/CModal"
;
import
CButton
from
"../../components/CButton"
;
import
{
GOOGLE_MAPS_API_KEY
}
from
"../../constants/constants"
;
const
Home
:
React
.
FC
=
()
=>
{
const
[
isOpenRemoveDeviceModal
,
setIsOpenRemoveDeviceModal
]
=
useState
(
false
);
...
...
@@ -76,6 +77,9 @@ const Home: React.FC = () => {
<
div
className=
"home"
>
<
div
style=
{
{
height
:
"52vh"
,
width
:
"100%"
}
}
>
<
GoogleMapReact
bootstrapURLKeys=
{
{
key
:
GOOGLE_MAPS_API_KEY
,
}
}
center=
{
mapCenter
}
defaultZoom=
{
12
}
options=
{
{
disableDefaultUI
:
true
}
}
...
...
src/pages/Routes/Routes.tsx
View file @
496258f4
...
...
@@ -11,6 +11,7 @@ import {
}
from
"../../stores/store"
;
import
{
getRouteHistory
}
from
"../../stores/slices/dataSlice"
;
import
CMarker
from
"../../components/CMarker"
;
import
{
GOOGLE_MAPS_API_KEY
}
from
"../../constants/constants"
;
const
Routes
:
React
.
FC
=
()
=>
{
const
[
fromDate
,
setFromDate
]
=
useState
(
""
);
...
...
@@ -88,6 +89,9 @@ const Routes: React.FC = () => {
<
div
className=
"routes__content"
>
<
div
style=
{
{
height
:
"67vh"
,
width
:
"100%"
}
}
>
<
GoogleMapReact
bootstrapURLKeys=
{
{
key
:
GOOGLE_MAPS_API_KEY
,
}
}
center=
{
mapCenter
}
defaultZoom=
{
12
}
options=
{
{
disableDefaultUI
:
true
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment