Skip to content

Commit

Permalink
Feature/firebase (#9)
Browse files Browse the repository at this point in the history
* Initial deployment graph app (#8)

* removed unnused imports

* fixed spell errors on README

* searchbar with logo and footer v1.0

* aligned logo with search buttons and minor styling fixes

* changed analyze text, added icons to the buttons and text to footer

* fixed footer margins

* removed unused imports and comments unused variables

* Feature/landing page (#5)

* a

* removed unused imports and comments unused variables

* Fix everything

* removed unused imports and comments unused variables

* Initial deploy of graph app (#2)

* removed unnused imports

* fixed spell errors on README

* searchbar with logo and footer v1.0

* aligned logo with search buttons and minor styling fixes

* changed analyze text, added icons to the buttons and text to footer

* fixed footer margins

* removed unused imports and comments unused variables

* removed unused imports and comments unused variables

* add github action to deploy on pull request

* fixed github actions to deploy app to firebase

* ignore -.firebase directory

---------

Co-authored-by: Pedro Ribeiro <[email protected]>

* Initial deployment graph app (#7)

* a

* removed unused imports and comments unused variables

* Fix everything

* removed unused imports and comments unused variables

* Initial deploy of graph app (#2)

* removed unnused imports

* fixed spell errors on README

* searchbar with logo and footer v1.0

* aligned logo with search buttons and minor styling fixes

* changed analyze text, added icons to the buttons and text to footer

* fixed footer margins

* removed unused imports and comments unused variables

* removed unused imports and comments unused variables

* add github action to deploy on pull request

* fixed github actions to deploy app to firebase

* ignore -.firebase directory

* Revert "Initial deploy of graph app" (#6)

---------

Co-authored-by: Pedro Ribeiro <[email protected]>

---------

Co-authored-by: Pedro Ribeiro <[email protected]>

* added google analytics to firebase configuration

* new google analytics event on search address

---------

Co-authored-by: Pedro Ribeiro <[email protected]>
  • Loading branch information
Rodriguespn and tubarao312 committed Feb 3, 2024
1 parent 4d11320 commit bc3e890
Show file tree
Hide file tree
Showing 4 changed files with 5,480 additions and 2 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGING_SENDER_ID=
VITE_FIREBASE_APP_ID=

# For Google Analytics
VITE_FIREBASE_MEASUREMENT_ID=
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@
"prettier-plugin-tailwindcss"
]
}
}
}
11 changes: 11 additions & 0 deletions src/components/Graph/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ enum HotKeyMap {
ESCAPE,
}

import { default as firebase } from "../../firebase/firebase"
import { logEvent } from "firebase/analytics";

/* Pan on drag settings */
const panOnDrag = [1, 2];

Expand Down Expand Up @@ -718,6 +721,14 @@ const Graph: FC = () => {
});
};

const onSetSearchedAddress = (newAddress: string) => {
setSearchedAddress(newAddress);

logEvent(firebase.analytics, "search_address", {
address: newAddress,
});
}

return (
<div className="h-full w-full overflow-hidden">
<Transition
Expand Down
Loading

0 comments on commit bc3e890

Please sign in to comment.