Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelef committed Oct 2, 2023
1 parent 4ade437 commit ced4e39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.1

require (
github.com/Code-Hex/go-generics-cache v1.3.1
github.com/emanuelef/github-repo-activity-stats v0.0.0-20231001064852-5063577ee96b
github.com/emanuelef/github-repo-activity-stats v0.0.0-20231002005209-1312a046d21b
github.com/gofiber/contrib/otelfiber v1.0.10
github.com/gofiber/fiber/v2 v2.49.2
github.com/joho/godotenv v1.5.1
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqy
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emanuelef/github-repo-activity-stats v0.0.0-20231001062114-4a8aa1407f89 h1:7ZHVvnPGOM6fHApWHGiqlhMY7Y1G1E4aI2pw8/ZbGEQ=
github.com/emanuelef/github-repo-activity-stats v0.0.0-20231001062114-4a8aa1407f89/go.mod h1:HxMMesEDFwP2qwMujqHXlPS3YAclZLYKFFmf2MPCmPk=
github.com/emanuelef/github-repo-activity-stats v0.0.0-20231001064852-5063577ee96b h1:rYE/+6Xf6uT2RFkb2KAKoVGcjtPwe1NB703o4Qlk94s=
github.com/emanuelef/github-repo-activity-stats v0.0.0-20231001064852-5063577ee96b/go.mod h1:HxMMesEDFwP2qwMujqHXlPS3YAclZLYKFFmf2MPCmPk=
github.com/emanuelef/github-repo-activity-stats v0.0.0-20231002005209-1312a046d21b h1:2TpL/2a/UXqpFIecyWA9x94sXxoqN1NJAXZCwD/+PMs=
github.com/emanuelef/github-repo-activity-stats v0.0.0-20231002005209-1312a046d21b/go.mod h1:HxMMesEDFwP2qwMujqHXlPS3YAclZLYKFFmf2MPCmPk=
github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
Expand Down
8 changes: 3 additions & 5 deletions website/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const parseGitHubRepoURL = (url) => {
function App() {
const [selectedRepo, setSelectedRepo] = useState("helm/helm-mapkubeapis");
const [collapsed, setCollapsed] = useState(true);
const [result, setResult] = useState("");
const [result, setResult] = useState({});
const [totalRequests, setTotalRequests] = useState(60);
const [remainingRequests, setRemainingRequests] = useState(totalRequests);
const [resetLimitsTime, setResetLimitsTime] = useState(60);
Expand Down Expand Up @@ -123,7 +123,7 @@ function App() {
fetchRepoStats(selectedRepo);
const intervalId = setInterval(fetchLimits, 30000);
return () => clearInterval(intervalId);
}, []);
}, [selectedRepo]);

const handleClick = async () => {
fetchRepoStats(parseGitHubRepoURL(selectedRepo));
Expand Down Expand Up @@ -172,9 +172,7 @@ function App() {
text="API Limits reset"
totalTime={resetLimitsTime}
/>
<div>
<JsonView src={result} />
</div>
<div>{result && <JsonView src={result} collapsed={1} />}</div>
</div>
);
};
Expand Down

0 comments on commit ced4e39

Please sign in to comment.