Skip to content

Commit 904ebb6

Browse files
authored
fix: 랜덤 이미지 URL 변경
1 parent 73a886d commit 904ebb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/components/UnsplashUploader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const UnsplashUploader = () => {
1111
const mounted = useRef(false);
1212
const getRandomImage = async () => {
1313
if (!timer) {
14-
const response = await fetch('https://source.unsplash.com/random');
14+
const response = await fetch(`https://picsum.photos/${280}/${280}?random=${Date.now()}`);
1515
setIsLoading(true);
1616
timer = setTimeout(function () {
1717
timer = null;
@@ -25,7 +25,7 @@ const UnsplashUploader = () => {
2525
};
2626
useEffect(() => {
2727
if (imageSrc === '') {
28-
fetch('https://source.unsplash.com/random').then((response) => {
28+
fetch(`https://picsum.photos/${280}/${280}?random=${Date.now()}`).then((response) => {
2929
setImageSrc(response.url);
3030
});
3131
}

0 commit comments

Comments
 (0)