Bloggify / github-calendar

:bar_chart: Embed your GitHub calendar everywhere.
https://bloggify.github.io/github-calendar/example/
MIT License
1.24k stars 213 forks source link

Hello, Calendar Stopped Displaying #170

Closed HernanMorel closed 1 year ago

HernanMorel commented 1 year ago

I've been using this package for about 2 months, today I noticed that the calendar is no longer visible out of nowhere. No changes made on my end.

This is the devTools error TypeError: Cannot read properties of null (reading 'getAttribute')

This is my component

import React, { useEffect } from 'react';
import GitHubCalendar from 'github-calendar';

function GHCalendar() {
  const myRef = React.useRef(null);

  useEffect(() => {
    if (myRef.current) {
      GitHubCalendar(myRef.current, 'HernanMorel', {
        responsive: true,
        cache: 5,
      });
    }
  }, []);

  return <div className="calendar" ref={myRef} />;
}

export default GHCalendar;
shivam-bit commented 1 year ago

@HernanMorel were you able to find a fix for this? i am facing same issue.

HernanMorel commented 1 year ago

I wasn't unfortunately. I resorted to another library to display the same info. I can do some digging to see exactly which one I used if you need it still.