Skip to content

Commit

Permalink
remove getDates.ts, add index number for getting randomPicture in Pre…
Browse files Browse the repository at this point in the history
…viewImage.tsx
  • Loading branch information
dorothyynwong committed Aug 2, 2024
1 parent 533e5e5 commit 093c386
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion src/images/PreviewImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function PreviewImage() {
const handleRandomButtonClick = async () => {
try {
const randomPicture = await fetchRandomAPI("https://api.nasa.gov/planetary/apod?api_key=");
setMyPreviewImage(randomPicture);
setMyPreviewImage(randomPicture[0]);
console.log(myPreviewImage);

}
Expand Down
11 changes: 0 additions & 11 deletions src/utils/getDates.ts

This file was deleted.

0 comments on commit 093c386

Please sign in to comment.