Skip to content

Commit

Permalink
Fixed overview poster wrap (#2567)
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson-oki authored Jul 6, 2024
1 parent 44b5fe7 commit 8c65777
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions frontend/src/pages/views/ItemOverview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FunctionComponent, useMemo } from "react";
import React, { FunctionComponent, useMemo } from "react";
import {
BackgroundImage,
Badge,
Expand All @@ -12,6 +12,7 @@ import {
Stack,
Text,
Title,
Tooltip,
} from "@mantine/core";
import {
faBookmark as farBookmark,
Expand Down Expand Up @@ -43,12 +44,18 @@ const ItemOverview: FunctionComponent<Props> = (props) => {
const { item, details } = props;

const detailBadges = useMemo(() => {
const badges: (JSX.Element | null)[] = [];
const badges: (React.JSX.Element | null)[] = [];

if (item) {
badges.push(
<ItemBadge key="file-path" icon={faFolder} title="File Path">
{item.path}
<Tooltip
label={item.path}
multiline
style={{ overflowWrap: "anywhere" }}
>
<span>{item.path}</span>
</Tooltip>
</ItemBadge>,
);

Expand Down Expand Up @@ -90,7 +97,7 @@ const ItemOverview: FunctionComponent<Props> = (props) => {
const profileItems = useProfileItemsToLanguages(profile);

const languageBadges = useMemo(() => {
const badges: (JSX.Element | null)[] = [];
const badges: (React.JSX.Element | null)[] = [];

if (profile) {
badges.push(
Expand Down Expand Up @@ -129,7 +136,9 @@ const ItemOverview: FunctionComponent<Props> = (props) => {
m={0}
style={{
backgroundColor: "rgba(0,0,0,0.7)",
flexWrap: "nowrap",
}}
styles={{
inner: { flexWrap: "nowrap" },
}}
>
<Grid.Col span={3} visibleFrom="sm">
Expand All @@ -140,7 +149,7 @@ const ItemOverview: FunctionComponent<Props> = (props) => {
fallbackSrc="https://placehold.co/250x250?text=Placeholder"
></Image>
</Grid.Col>
<Grid.Col span={8} maw="100%">
<Grid.Col span={8} maw="100%" style={{ overflow: "hidden" }}>
<Stack align="flex-start" gap="xs" mx={6}>
<Group align="flex-start" wrap="nowrap" maw="100%">
<Title my={0}>
Expand Down

0 comments on commit 8c65777

Please sign in to comment.