import React from 'react';
import { Col } from '@tlon/indigo-react';
import { MentionText } from '~/views/components/MentionText';
import useContactState from '~/logic/state/contact';


export function PostContent(props) {
  const { post, isParent, api, isReply } = props;
  const contacts = useContactState(state => state.contacts);

  return (
    <Col
      width="100%"
      pl="2"
      pr="2"
      pb={isParent || isReply ? "0" : "2"}
      maxHeight={ isParent ? "none" : "300px" }
      textOverflow="ellipsis"
      overflow="hidden"
      display="inline-block">
      <MentionText
        contacts={contacts}
        content={post.contents}
        api={api}
        transcluded={0}
      />
    </Col>
  );
}


@@ -32,16 +32,21 @@
 rt %7B Col
+, Box
  %7D from 
@@ -80,27 +80,32 @@
 t %7B 
-MentionText
+GraphContentWide
  %7D from 
 '~/v
@@ -104,17 +104,17 @@
 rom 
-'
+%22
 ~/views/
 comp
@@ -109,16 +109,26 @@
 ~/views/
+landscape/
 componen
@@ -134,75 +134,220 @@
 nts/
-MentionText';%0Aimport useContactState from '~/logic/state/contact';%0A
+Graph/GraphContentWide%22;%0Aimport styled from 'styled-components';%0A%0Aconst TruncatedBox = styled(Col)%60%0A  display: -webkit-box;%0A  -webkit-line-clamp: $%7Bp =%3E p.truncate ?? 'unset'%7D;%0A  -webkit-box-orient: vertical;%0A%0A%60;
 %0A%0Aex
@@ -435,196 +435,127 @@
 ps;%0A
+%0A
   
-const contacts = useContactState(state =%3E state.contacts);%0A%0A  return (%0A    %3CCol%0A      width=%22100%25%22%0A      pl=%222%22%0A      pr=%222%22%0A      pb=%7BisParent %7C%7C isReply ? %220%22 : %222%22%7D%0A      maxHeight
+return (%0A    %3CTruncatedBox%0A      display=%22-webkit-box%22%0A      width=%22100%25%22%0A      pl=%222%22%0A      pr=%222%22%0A      truncate
 =%7B
- 
 isPa
@@ -565,25 +565,16 @@
 t ? 
-%22none%22 : %22300px%22 
+null : 8
 %7D%0A  
@@ -634,78 +634,56 @@
     
- display=%22inline-block%22%3E%0A      %3CMentionText%0A        contacts=%7Bcontacts
+%3E%0A      %3CGraphContentWide%0A        transcluded=%7B0
 %7D%0A  
@@ -692,30 +692,18 @@
     
-conten
+pos
 t=%7Bpost
-.contents
 %7D%0A  
@@ -722,39 +722,38 @@
 pi%7D%0A        
-transcluded=%7B0%7D
+showOurContact
 %0A      /%3E%0A  
@@ -756,19 +756,28 @@
 %3E%0A    %3C/
-Col
+TruncatedBox
 %3E%0A  );%0A%7D

use unified graph rendering