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

feat: add firebase remote config #376

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

120EE0692
Copy link
Member

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your default branch!
  • Make sure you are making a pull request against the default branch (left side). Also you should start your branch off default branch.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.
  • I have added necessary documentation (if appropriate)

Linked Issues

Fixes

Description

Please describe your pull request.

❤️Thank you!

Post merge checklist

  • Follow steps from the guidelines for contributing to this repository.
  • If you are a new contributor, ping in the thread and one of the maintainers will add you to all-contributors list.

@120EE0692 120EE0692 added the enhancement New feature or request label Dec 25, 2022
@120EE0692 120EE0692 self-assigned this Dec 25, 2022
client/src/config/firebase.js Outdated Show resolved Hide resolved
client/src/config/remoteConfig.js Outdated Show resolved Hide resolved
isLivePageVisible = getValue(remote, 'isLivePageVisible').asBoolean();
}
}
initRemoteConfig();
Copy link
Member

Choose a reason for hiding this comment

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

This is not a good practice. Make this call as part of some init firebase script where authentication and everything is being initialized.

Copy link
Member

Choose a reason for hiding this comment

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

A solution would be to run this in the FirebaseContext we have wrapped over the app.

Copy link
Member Author

@120EE0692 120EE0692 Jan 4, 2023

Choose a reason for hiding this comment

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

@rutajdash I think this method is better as in future we may required many more values from remote config, in that case context will looked up bit messy, this style is referred from their docs.

Copy link
Member

Choose a reason for hiding this comment

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

Then find a way to keep context clean. You never define a function and then add the call right there below it. That is a very bar practice.

Copy link
Member Author

Choose a reason for hiding this comment

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

@rutajdash where I should exactly call this.

client/src/screens/BlockScreen.jsx Outdated Show resolved Hide resolved
Copy link
Member

@rutajdash rutajdash left a comment

Choose a reason for hiding this comment

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

Please fix the remote config call. Rest is good to go.

@120EE0692
Copy link
Member Author

Please fix the remote config call. Rest is good to go.

@rutajdash where should we exactly call the remote config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants