Skip to content
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

Make zoom level variable optional #27

Merged
merged 2 commits into from
Feb 20, 2023
Merged

Make zoom level variable optional #27

merged 2 commits into from
Feb 20, 2023

Conversation

lucyhutcheson
Copy link
Contributor

Proposed Changes:

  1. Make REACT_APP_MIN_ZOOM_LEVEL optional
  2. Set default value for REACT_APP_MIN_ZOOM_LEVEL

PR Checklist:

  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

@@ -27,7 +27,7 @@ const BottomContent = () => {

const ANALYZE_LINK = process.env.REACT_APP_ANALYZE_BTN_URL
const SHOW_PUBLISH_BTN = process.env.REACT_APP_SHOW_PUBLISH_BTN
const MIN_ZOOM = process.env.REACT_APP_MIN_ZOOM_LEVEL
const MIN_ZOOM = process.env.REACT_APP_MIN_ZOOM_LEVEL || 7

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the default value is used in two different files, it should be re-used from a common constant. You could put the definition of const MIN_ZOOM = process.env.REACT_APP_MIN_ZOOM_LEVEL || 7 in a new filesrc/components/defaults.js and export it, and then import it as a MIN_ZOOM.

@philvarner philvarner merged commit fc83a4d into main Feb 20, 2023
@philvarner philvarner deleted the lh/zoom-level-change branch February 20, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants