Skip to content

Commit 4230ad6

Browse files
committed
final tidy up
1 parent a7e114a commit 4230ad6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

example/next-storage/components/Avatar.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ export default function Avatar({ url, size }: { url: string | null; size: number
55
const [avatarUrl, setAvatarUrl] = useState<string | null>(null)
66

77
useEffect(() => {
8-
if (url) {
9-
console.log('url', url)
10-
downloadImage(url)
11-
}
8+
if (url) downloadImage(url)
129
}, [url])
1310

1411
async function downloadImage(path: string) {
@@ -20,7 +17,7 @@ export default function Avatar({ url, size }: { url: string | null; size: number
2017
const url = URL.createObjectURL(data)
2118
setAvatarUrl(url)
2219
} catch (error) {
23-
console.log('error', error.message)
20+
console.log('Error downloading image: ', error.message)
2421
}
2522
}
2623

0 commit comments

Comments
 (0)