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

getGenres is not a function #3

Open
1660063-StarJv-HCMUS opened this issue Sep 14, 2020 · 3 comments
Open

getGenres is not a function #3

1660063-StarJv-HCMUS opened this issue Sep 14, 2020 · 3 comments

Comments

@1660063-StarJv-HCMUS
Copy link

i try to install and run app, but my console show bug 'getGenres is not a function in
/src/views/LoadingPanel.js'
Capture

@valverde-marcelo
Copy link
Owner

Are you executing in demo mode?

getGenres is not implemented in mock api, only in real api.
skip this error by commenting out the lines, or implement the getGenres function in the mock api

@valverde-marcelo
Copy link
Owner

you need to check the value of the DEMO_MODE variable
this variable is stored in localstorage

/src/api/index.js

const api = storage.getSync(DEMO_MODE, LOCAL_STORAGE_PREFIX_SERVER) ? mockAPI : realAPI;

export default api;

this variable is set to true on first access, here:
/src/views/LoadingPanel.js

if (storage.getSync("access", LOCAL_STORAGE_PREFIX_SERVER) === null) {
...
storage.setSync("protocol", PROTOCOL_HTTP, LOCAL_STORAGE_PREFIX_SERVER);
storage.setSync(DEMO_MODE, true, LOCAL_STORAGE_PREFIX_SERVER);

....

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

No branches or pull requests

3 participants
@valverde-marcelo @1660063-StarJv-HCMUS and others