mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-17 00:30:04 +00:00
Fix layout issue in LibraryHeader
This commit is contained in:
@@ -5,12 +5,12 @@ import {randomGamesFromLibrary} from "Frontend/util/utils";
|
|||||||
|
|
||||||
interface LibraryHeaderProps {
|
interface LibraryHeaderProps {
|
||||||
library: LibraryDto;
|
library: LibraryDto;
|
||||||
maxCoverCount?: number;
|
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function LibraryHeader({library, maxCoverCount = 5, className}: LibraryHeaderProps) {
|
export default function LibraryHeader({library, className}: LibraryHeaderProps) {
|
||||||
const [randomGames, setRandomGames] = useState<GameDto[]>([]);
|
const [randomGames, setRandomGames] = useState<GameDto[]>([]);
|
||||||
|
const maxCoverCount = 5;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
randomGamesFromLibrary(library, maxCoverCount).then((games) => {
|
randomGamesFromLibrary(library, maxCoverCount).then((games) => {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default function LibraryManagementView() {
|
|||||||
</Button>
|
</Button>
|
||||||
<h1 className="text-2xl font-bold">Manage library</h1>
|
<h1 className="text-2xl font-bold">Manage library</h1>
|
||||||
</div>
|
</div>
|
||||||
<LibraryHeader library={library} maxCoverCount={Math.min(games.length, 10)} className="h-32"/>
|
<LibraryHeader library={library} className="h-32"/>
|
||||||
<Tabs color="primary" fullWidth>
|
<Tabs color="primary" fullWidth>
|
||||||
<Tab title="Details">
|
<Tab title="Details">
|
||||||
<LibraryManagementDetails library={library}/>
|
<LibraryManagementDetails library={library}/>
|
||||||
|
|||||||
Reference in New Issue
Block a user