diff --git a/apps/blueprints/src/components/BlueprintLink.tsx b/apps/blueprints/src/components/BlueprintLink.tsx index fc222e9..3f0c782 100644 --- a/apps/blueprints/src/components/BlueprintLink.tsx +++ b/apps/blueprints/src/components/BlueprintLink.tsx @@ -9,6 +9,7 @@ import { useState } from "react"; const linkStyles = css` margin: 5px 10px 5px 0; background: #353535; + width: 210px; .block { display: flex; @@ -25,6 +26,12 @@ const linkStyles = css` display: flex; } + .title { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + a { display: block; padding: 5px; @@ -76,9 +83,7 @@ export const BlueprintLink: React.FC = ({ {type === "tile" && (
{imageError ? ( -
- Looks like this image can\t load. -
+
The image is not generated yet, please be patient it will come soon.
) : ( src} @@ -96,7 +101,7 @@ export const BlueprintLink: React.FC = ({ {blueprint.favorite_count || "0"} - {blueprint.title} + {blueprint.title} {type === "row" && ( diff --git a/apps/blueprints/src/components/BookChildTree.tsx b/apps/blueprints/src/components/BookChildTree.tsx index 44cdfd7..6b40525 100644 --- a/apps/blueprints/src/components/BookChildTree.tsx +++ b/apps/blueprints/src/components/BookChildTree.tsx @@ -71,14 +71,14 @@ export const BookChildTree: React.FC = ({ data, base_url, se {BBCode.toReact(bpData.blueprint.label)} - ) : ( + ) : bpData.blueprint_book ? ( - ); + ) : null; })}
diff --git a/apps/blueprints/src/components/Pagination.tsx b/apps/blueprints/src/components/Pagination.tsx index 917aa1e..b827f16 100644 --- a/apps/blueprints/src/components/Pagination.tsx +++ b/apps/blueprints/src/components/Pagination.tsx @@ -34,7 +34,7 @@ export const Pagination: React.FC = ({ }) => ( {page > 1 && } - {!totalPages || (page + 1 < totalPages && )} - {totalItems ? {totalItems} total items : null} + {!totalPages || (page + 1 <= totalPages && )} + {totalItems ? {totalItems} total items : null} ); diff --git a/apps/blueprints/src/pages/blueprint/[blueprintId].tsx b/apps/blueprints/src/pages/blueprint/[blueprintId].tsx index 37f20b2..3d39acc 100644 --- a/apps/blueprints/src/pages/blueprint/[blueprintId].tsx +++ b/apps/blueprints/src/pages/blueprint/[blueprintId].tsx @@ -24,6 +24,7 @@ import { ImageEditor } from "../../components/ImageEditor"; import { useAuth } from "../../providers/auth"; import { pageHandler } from "../../utils/page-handler"; import styled from "@emotion/styled"; +import { css } from "@emotion/react"; import { AiOutlineHeart, AiFillHeart } from "react-icons/ai"; type Selected = @@ -38,6 +39,21 @@ interface IndexProps { favorite: boolean; } +const BlueprintStyles = css` + .title { + position: relative; + width: 100%; + + .text { + white-space: nowrap; + width: 85%; + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + } + } +`; + const StyledTable = styled.table` td { border: 1px solid #909090; @@ -86,7 +102,7 @@ export const Index: NextPage = ({ }) .catch((reason) => console.error(reason)); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [selectedHash]); + }, []); useEffect(() => { fetch(`/api/string/${selectedHash}`) @@ -126,14 +142,15 @@ export const Index: NextPage = ({ return ( - {blueprint_page.title} +
+ {blueprint_page.title} {auth && (