diff --git a/ui/src/components/sidebar/AlbumCovers.tsx b/ui/src/components/sidebar/AlbumCovers.tsx index ec63622..034b2ac 100644 --- a/ui/src/components/sidebar/AlbumCovers.tsx +++ b/ui/src/components/sidebar/AlbumCovers.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import React, { useState, useEffect } from 'react' import { useMutation, gql } from '@apollo/client' import { useTranslation } from 'react-i18next' @@ -46,6 +46,10 @@ export const SidebarPhotoCover = ({ cover_id }: SidebarPhotoCoverProps) => { const [buttonDisabled, setButtonDisabled] = useState(false) + useEffect(() => { + setButtonDisabled(false) + }, [cover_id]) + return ( @@ -99,6 +103,10 @@ export const SidebarAlbumCover = ({ id }: SidebarAlbumCoverProps) => { const [buttonDisabled, setButtonDisabled] = useState(false) + useEffect(() => { + setButtonDisabled(false) + }, [id]) + return (