diff --git a/packages/frontend/src/components/insight-connection-card/components/square-insight-card/square-insight-card.tsx b/packages/frontend/src/components/insight-connection-card/components/square-insight-card/square-insight-card.tsx index 8c9fb4768..407d5f2f4 100644 --- a/packages/frontend/src/components/insight-connection-card/components/square-insight-card/square-insight-card.tsx +++ b/packages/frontend/src/components/insight-connection-card/components/square-insight-card/square-insight-card.tsx @@ -43,15 +43,15 @@ export const SquareInsightCard = ({ insightEdge, options, ...props }: InsightCon const insight = insightEdge.node; return ( - + diff --git a/packages/frontend/src/components/insight-list/components/insight-list-skeleton/insight-list-skeleton.tsx b/packages/frontend/src/components/insight-list/components/insight-list-skeleton/insight-list-skeleton.tsx index 49dbeb387..b9aa60c6f 100644 --- a/packages/frontend/src/components/insight-list/components/insight-list-skeleton/insight-list-skeleton.tsx +++ b/packages/frontend/src/components/insight-list/components/insight-list-skeleton/insight-list-skeleton.tsx @@ -14,9 +14,32 @@ * limitations under the License. */ -import { Skeleton } from '@chakra-ui/react'; +import { Skeleton, Wrap } from '@chakra-ui/react'; export const InsightListSkeleton = ({ count = 3, options }) => { + // Special handling for Square + if (options.layout === 'square') { + return ( + ul': { + flexWrap: { base: 'nowrap', sm: 'wrap' } + } + }} + > + {new Array(count * 2).fill(1).map((value, index) => ( + + ))} + + ); + } + let layoutProps = {}; switch (options.layout) { case 'square': diff --git a/packages/frontend/src/components/insight-list/insight-list.tsx b/packages/frontend/src/components/insight-list/insight-list.tsx index 6691683fb..0de6270a4 100644 --- a/packages/frontend/src/components/insight-list/insight-list.tsx +++ b/packages/frontend/src/components/insight-list/insight-list.tsx @@ -28,9 +28,19 @@ const EdgeContainer = ({ edges, options }) => { switch (options.layout) { case 'square': return ( - + ul': { + // Disable wrap at small screen sizes + flexWrap: { base: 'nowrap', sm: 'wrap' } + } + }} + > {edges.map((edge) => ( - + ))}