-
Notifications
You must be signed in to change notification settings - Fork 8
Feature/remove analytics #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes all analytics and cookie consent functionality from the application. The key changes include:
- Removal of the ReactGA analytics calls and related cookie consent code in multiple route components.
- Cleanup of state management and actions related to cookie preferences in reducers and context providers.
- Simplification of the App component by eliminating cookie banner logic and associated functionality.
Reviewed Changes
Copilot reviewed 14 out of 26 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/routes/Generate/index.jsx | Removed ReactGA import and calls; dropped allowCookies reference from state destructuring. |
| src/routes/Advisor/index.jsx | Removed ReactGA import and calls; updated language assignment to use consistent indexing. |
| src/routes/About/index.jsx | Removed ReactGA import and calls; simplified state usage by removing cookie-related props. |
| src/reducers/MainReducer/index.js | Removed allowCookies case and associated localStorage usage from the reducer. |
| src/reducers/MainReducer/Actions/index.js | Removed action creator for allowCookies. |
| src/reducers/MainReducer/Actions/actionTypes.js | Removed action type constant for allowCookies. |
| src/contexts/MainContextProvider/index.jsx | Removed initialization logic for allowCookies and hasSetCookies from the context. |
| src/components/App/index.jsx | Removed ReactGA integration and cookie banner logic, streamlining the App component. |
Files not reviewed (12)
- .dockerignore: Language not supported
- Dockerfile: Language not supported
- package.json: Language not supported
- src/languages/de_de.json: Language not supported
- src/languages/en_us.json: Language not supported
- src/languages/es_es.json: Language not supported
- src/languages/fr_fr.json: Language not supported
- src/languages/jp_jp.json: Language not supported
- src/languages/nl_nl.json: Language not supported
- src/languages/ru_ru.json: Language not supported
- src/languages/tr_tr.json: Language not supported
- src/languages/zh_cn.json: Language not supported
Comments suppressed due to low confidence (4)
src/routes/Generate/index.jsx:36
- [nitpick] Consider using a more descriptive name than 'state1' (for example, 'mainState') to improve clarity and consistency across components.
const [state1, d1] = useContext(MainContext);
src/reducers/MainReducer/index.js:101
- [nitpick] After removing cookie analytics features, ensure that any related legacy localStorage usage (like 'localStorage.allowCookies') is fully cleaned up to prevent future confusion.
case SET_ALLOW_COOKIES:
src/components/App/index.jsx:8
- [nitpick] Confirm that the removal of the ReactGA import and all associated references is aligned with the removal of analytics; update any related documentation accordingly.
import ReactGA from 'react-ga4';
src/contexts/MainContextProvider/index.jsx:30
- [nitpick] Verify that removed properties (allowCookies and hasSetCookies) are not referenced in other parts of the codebase and that the context state remains clear and consistent.
const initState = { autoUpdate, loading: false, colorOnDark, tips, sortByStrength };
No description provided.