YogeshPrasanna / expense-manager-react

An 💰 Expense Tracking App Made using React ⚛️ , Firebase for storage and authentication
https://sad-shirley-6ef62f.netlify.app/
MIT License
77 stars 53 forks source link

Infinite loading #26

Open Abhijeetm96 opened 5 years ago

Abhijeetm96 commented 5 years ago

Hi @YogeshPrasanna

The loan page is in infinite loading state. Even the insert (+) button is missing. However didn't find any such issue with your demo site.

image

Abhijeetm96 commented 5 years ago

I figured out the infinite loading is because there is no data available. The main concern is with the (+) button.

image

This is what i got when i deleted every records from the expense table. So I assume the same would be the case with loan page too.

After inserting data image

YogeshPrasanna commented 5 years ago

This Particular scenario is happening whenever there is no legacy tables ( Expenses and loans ) in the firebase database.

New Table names - ExpenseTable , LoanTable

Need to avoid migration steps for new Databases created by new users.

Rahulkasyap commented 5 years ago

@YogeshPrasanna , @Abhijeetm96

What is the method to clear this issue. please apologise if my question is silly.

Thanks in advance

YogeshPrasanna commented 5 years ago

we'll have to check whether the legacy tables exists in the database , if they dont exist then we sould not make a request to those tables for migration.

Here we are basically checking if the new tables have no records , we are trying to get the data from the legacy tables and put in here , this is what is causing infinite loading ,once you store values in the new DB this issue is solved , but for a new user who just lands in to the application , this needs to be handled . i'll Look into this in some time

Rahulkasyap commented 5 years ago

Hi Yogesh. any updates on the issue


From: Yogesh notifications@github.com Sent: 03 July 2019 08:01 To: YogeshPrasanna/expense-manager-react Cc: Rahulkasyap; Comment Subject: Re: [YogeshPrasanna/expense-manager-react] Infinite loading (#26)

we'll have to check whether the legacy tables exists in the database , if they dont exist then we sould not make a request to those tables for migration.

Here we are basically checking if the new tables have no reacords , we are trying to get the data from the legacy tables and put in here , this is what is causing infinite loading ,once you store values in the new DB this issue is solved , but for a new user who just lands in to the application , this needs to be handled . i'll Look into this in some time

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/YogeshPrasanna/expense-manager-react/issues/26?email_source=notifications&email_token=AMPHNQZBABB2SYVJR7Y2UCTP5QFQJA5CNFSM4H4LR7NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZDCLOY#issuecomment-507913659, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMPHNQ6FLYMRA7X7SMO77EDP5QFQJANCNFSM4H4LR7NA.

YogeshPrasanna commented 5 years ago

There's some work to do for that , for now I'll give a temporary fix to show the loan button in loan page . I'll check in the code tomorrow