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

Calendar not getting data #6

Closed
zadinvit opened this issue Jun 22, 2022 · 1 comment · Fixed by #8
Closed

Calendar not getting data #6

zadinvit opened this issue Jun 22, 2022 · 1 comment · Fixed by #8
Assignees
Labels
bug Something isn't working

Comments

@zadinvit
Copy link

Hi,
calendar don't showing data. Only show error message that I don't have data in collection. I found that bug is in pages/index.js you calling api.getData() but I think you need call api.GetCollections(). Atleast this fix problem for me.

Fixed functions here:

const load = date => {
    setLoading(true);
    api.getCollections(date).then(r => {
      setData(r.data);
      setLoading(false);
    });
  };

  const initialLoad = () => {
    api.getCollections().then(r => {
      setData(r.data);
    });
    api.getSettings().then(r => {
      if (r.data) {
        setSettings(r.data);
        setState(s => ({ ...s, view: r.data.defaultView }));
      }
      setLoading(false);
    });
  };
  
@LuisRodriguezLD
Copy link
Contributor

Thanks for reporting.
The issue was a little different, but I've patched this.
Please upgrade to v0.0.7 and reopen if issue persists.

@LuisRodriguezLD LuisRodriguezLD added the bug Something isn't working label Jul 4, 2022
@LuisRodriguezLD LuisRodriguezLD self-assigned this Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants