GithubHelp home page GithubHelp logo

createthrive / react-firebase-admin Goto Github PK

View Code? Open in Web Editor NEW
402.0 12.0 96.0 4.12 MB

React โš›๏ธ starter kit with Firebase ๐Ÿ”ฅ and Bulma for setting up an admin dashboard - Highly scalable, PWA, Serverless

Home Page: https://docs.react-firebase.com

License: MIT License

JavaScript 91.06% HTML 1.20% CSS 1.07% TypeScript 4.61% Shell 0.26% SCSS 1.80%
react redux firebase bulma pwa offline routing responsive cloud-functions serverless

react-firebase-admin's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar jfocco avatar mateokruk avatar pipisasa avatar topofgr avatar tpiaggio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-firebase-admin's Issues

Email disappears when updating profile

Describe the bug
When the users update any information of it's profile the user is removed from the local state but it remains in the database.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Profile'
  2. Click on 'Submit' (Update profile card)
  3. Go to 'Home'
  4. Go to 'Profile' again
  5. You can see that the email is not showing up

Expected behavior
After a user updates its personal information the email attribute should remain untouched.

Screenshots
bug-1

"Unable to resolve dependency tree" while installing dependencies

Describe the bug
Project does not work as expected out of the box when running npm install - issues with React version dependencies occur:

PS J:\xxx> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@">=15 <17" from [email protected]
npm ERR! node_modules/react-firebaseui
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Then, when trying to re-run with npm install --legacy-peer-deps, there are further issues with node-gyp (msbuild tools and python versions) which have led me down quite the rabbithole:

npm ERR! gyp verb check python checking for Python executable "C:/Python2.7/python.exe" in the PATH
npm ERR! gyp verb `which` failed Error: not found: C:/Python2.7/python.exe

Python2.7 is installed at that location and is in my path, including under NODE_GYP_FORCE_PYTHON:
image

Which I know works, as I have been following the instructions here (https://stackoverflow.com/a/60471089) for remedying this node-gyp issue, and upon running node-gyp configure as part of this test I am told to upgrade from Python2.7 - so I am unsure why when running npm install --legacy-peer-deps with this project that Python 2.7 cannot be found.

S J:\xxx\hello_module>  node-gyp configure   
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp ERR! find Python 
gyp ERR! find Python checking Python explicitly set from NODE_GYP_FORCE_PYTHON
gyp ERR! find Python - process.env.NODE_GYP_FORCE_PYTHON is "C:\Python27\python.exe"
gyp ERR! find Python - executable path is "C:\Python27\python.exe"
gyp ERR! find Python - version is "2.7.18"
gyp ERR! find Python - version is 2.7.18 - should be >=3.6.0
gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED

Any help would be appreciated.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo
  2. Follow the documentation steps for 'Installing Dependencies' https://docs.react-firebase.com/getting-started#installing-dependencies
  3. Run npm install
  4. See error

Expected behavior
The dependencies install as expected.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10

build failing lots of deprecated dependencies.

Describe the bug
received a 13k+ long error log file so I cant identify exactly what the issue was.

To Reproduce
I followed all steps in documentation and came up on the error when running 'npm run setup-admin-dashboard.

Expected behavior
Expected dependencies to install

Desktop (please complete the following information):

  • OS: OSX Big sur

Additional context
using node v18.4.0
npm 8.12.1

Remove 'delete' and 'edit' button for admin users in the table

Right now an admin user can edit or delete any user in the database. We shouldn't let an admin user edit or delete other admin users, so we should hide that buttons in case the the user is an admin. We should also verify that on the database rules

Importing Bulma css multiple times

Describe the bug
We're importing the css manually in the index.js file. This is not necessary because the Bulma package in our package.json file already imports it.

How to overwrite react-firebase-admin's theme?

I see that there is a CSS file in src/assets/css/main.css. How do I overwrite it since it seems to have overwritten Bulma's variables? Preferably there is the Sass version of it for me to import and overwrite it.

I have tried to customize Bulma like so:

// custom.scss
@import 'bulma/sass/utilities/initial-variables.sass';
$primary: rgb(82, 84, 84);
@import 'bulma/bulma.sass';

and import it in index.js after src/assets/css/main.css but it caused styling error.

Cant run npm run setup-firebase

Describe the bug
it says that it doesnt find the script to run it

To Reproduce
Steps to reproduce the behavior:
I just followed the readme and im getting the error

Expected behavior
like the readme would say to enter a certain path after

Screenshots
image
image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Error: Objects are not valid as a React child (found: Error: permission_denied at /users/acOx... Client doesn't have permission to access the desired data.)

Describe the bug

Hi I have follow the instructions carefully and every command has been run successfully. I get access to the login page but when I try to log in with the user and password I provided in the 'npm run setup-firebase' step I get the following error:

Error: Objects are not valid as a React child (found: Error: permission_denied at /users/acOxqVPkMfef9FFqDkXyqrAIVFt1: Client doesn't have permission to access the desired data.). If you meant to render a collection of children, use an array instead.
    in p (at Login/index.jsx:202)
    in form (at Login/index.jsx:128)
    in div (at Login/index.jsx:127)
    in div (at Login/index.jsx:116)
    in div (at Login/index.jsx:115)
    in div (at Login/index.jsx:114)
    in div (at Login/index.jsx:113)
    in div (at Login/index.jsx:112)
    in section (at Login/index.jsx:110)
    in Login (created by Context.Consumer)
    in Route (at Router/index.js:20)
    in Switch (at Router/index.js:19)
    in Router (created by BrowserRouter)
    in BrowserRouter (at Router/index.js:18)
    in RouterComponent (at src/index.js:32)
    in PersistGate (at src/index.js:21)
    in IntlProvider (at LanguageWrapper/index.js:24)
    in LanguageWrapper (at src/index.js:20)
    in Provider (at src/index.js:19)
throwOnInvalidObjectType
node_modules/react-dom/cjs/react-dom.development.js:13413
reconcileChildFibers
node_modules/react-dom/cjs/react-dom.development.js:14313
reconcileChildren
node_modules/react-dom/cjs/react-dom.development.js:16762
updateHostComponent
node_modules/react-dom/cjs/react-dom.development.js:17302
beginWork
node_modules/react-dom/cjs/react-dom.development.js:18627
callCallback
node_modules/react-dom/cjs/react-dom.development.js:188
invokeGuardedCallbackDev
node_modules/react-dom/cjs/react-dom.development.js:237
invokeGuardedCallback
node_modules/react-dom/cjs/react-dom.development.js:292
beginWork$1
node_modules/react-dom/cjs/react-dom.development.js:23203
performUnitOfWork
node_modules/react-dom/cjs/react-dom.development.js:22157
workLoopSync
node_modules/react-dom/cjs/react-dom.development.js:22130
performSyncWorkOnRoot
node_modules/react-dom/cjs/react-dom.development.js:21756
flushSyncCallbackQueueImpl/<
node_modules/react-dom/cjs/react-dom.development.js:11089
unstable_runWithPriority
node_modules/scheduler/cjs/scheduler.development.js:653
runWithPriority$1
node_modules/react-dom/cjs/react-dom.development.js:11039
flushSyncCallbackQueueImpl
node_modules/react-dom/cjs/react-dom.development.js:11084
flushSyncCallbackQueue
node_modules/react-dom/cjs/react-dom.development.js:11072
batchedUpdates$1
node_modules/react-dom/cjs/react-dom.development.js:21862
notify
node_modules/react-redux/es/utils/Subscription.js:19
notifyNestedSubs
node_modules/react-redux/es/utils/Subscription.js:92
handleChangeWrapper
node_modules/react-redux/es/utils/Subscription.js:97
dispatch
node_modules/redux/es/redux.js:222
createThunkMiddleware/</</<
node_modules/redux-thunk/es/index.js:11
dispatch
node_modules/redux/es/redux.js:638
fetchUserData/<
src/state/actions/auth.js:113

  110 |   ).val();
  111 | } catch (error) {
  112 |   dispatch(logout());
> 113 |   return dispatch(AUTH_FETCH_USER_DATA_FAIL({ error }));
      | ^  114 | }
  115 | 
  116 | if (!user) {

Screenshots
1
2

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser Firefox
  • Version 77.0.1 (64-bit)

Getting error.

After setup everything. I can see the login page on screen but after login, I am getting this error:

Unhandled Rejection (Error): Objects are not valid as a React child (found: Error: permission_denied at /users/1DfacH2cHqSUaxuQXO2QNvWeWII3: Client doesn't have permission to access the desired data.). If you meant to render a collection of children, use an array instead. in p (at Login/index.jsx:196) in form (at Login/index.jsx:122) in div (at Login/index.jsx:121) in div (at Login/index.jsx:110) in div (at Login/index.jsx:109) in div (at Login/index.jsx:108) in div (at Login/index.jsx:107) in div (at Login/index.jsx:106) in section (at Login/index.jsx:104) in Login (created by Context.Consumer) in Route (at Router/index.js:20) in Switch (at Router/index.js:19) in Router (created by BrowserRouter) in BrowserRouter (at Router/index.js:18) in RouterComponent (at src/index.js:32) in PersistGate (at src/index.js:21) in IntlProvider (at LanguageWrapper/index.js:24) in LanguageWrapper (at src/index.js:20) in Provider (at src/index.js:19)

Firebase init fails

Hi guys,

I have a folder structured like this:
/business
/customer
/admin (the react-firebase-admin cloned repository)
.firebaserc
firebase.json

I created those firebase files for hosting my customer and business apps, they use the same project,

When I try firebase init in my /admin directory, I get the error .firebaserc already has a default project, using react-firebase-admin-eeac2.

I want to keep those firebase files to continue handling my deploys in this way, what can I do ?

Thank you in advance,
Hope you guys can help me โค๏ธ

  • OS: MacOS BigSur

docs.react-firebase.com domain not working

Describe the bug
A clear and concise description of what the bug is.
The documentation website and the live preview website of react-firebase.com is not working, where can we find the documentation for react admin firebase ?
To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://docs.react-firebase.com/'
  2. See error

Expected behavior
Documentation website is not loading

Documentation for components

The principal problem with using this template is the lack of documentation about what components do, this could have a lot more starts if the components have at least what props are expected or minimal use of them.

Table component PropTypes

Is your feature request related to a problem? Please describe.
We want the Table component to be as reusable as possible. At the moment in this component we have a PropType for the data prop that's specific for a Table component with the columns for users.

Describe the solution you'd like
We should investigate a bit further into PropTypes and see if we can have a more general type checking for the data prop. We should not use the PropType.any because it's deprecated.

Describe alternatives you've considered
If a general type check is not available we should remove it.

Additional context
Typechecking With PropTypes

Add repo to documentation

Describe the bug
Great work! Reading your guide here: https://docs.react-firebase.com/getting-started#getting-started
You say that the first step is to clone your repo. But there's no link to the repo: https://github.com/CreateThrive/react-firebase-admin
(Took a while to find this repo, and also I got stuck in very similar projects on the way to find it here)

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://docs.react-firebase.com/getting-started#getting-started
  2. On getting started, read "Clone repo"
  3. But you find no link to the repo

Messages in Spanish

Is your feature request related to a problem? Please describe.
While filling inputs when creating a new user or setting your password for the first time the success/error messages are still in Spanish.

Describe the solution you'd like
We should change those messages to English.

Additional context
This messages can be found on: src/utils/index.js more specifically in the inputValidations function.

npm run setup-firebase failing

I'm getting the following error:
C:\xxxxxxxxx\horizon\functions>npm run setup-firebase
npm ERR! Missing script: "setup-firebase"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run

Build command appears not creating manifest.json file

Hi :)

I used your wonderful boilerplate for a project. Everything works perfectly on localhost. On production mode, I've got an error in the browser console:

manifest.json:1 Manifest: Line: 1, column: 5, Unexpected data after root element.
The attempt to bind "/%PUBLIC_URL%/manifest.json" in the workspace failed as this URI is malformed.
GET https://fake-appp-url.web.app/%PUBLIC_URL%/manifest.json

I've checked locally and the command npm run build doesn't generate manifest.json.

Any ideas?

Thanks a lot! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.