@@ -285,6 +285,7 @@ export function DeckTitle({ id }) {
285285
286286function PodSummary ( { id } ) {
287287 let pod = useSelector ( ( state ) => state . repo . pods [ id ] ) ;
288+ // console.log("PodSummary", id, pod.running);
288289 return (
289290 < Box as = "span" >
290291 { pod . running && < Spinner /> }
@@ -598,6 +599,7 @@ function WysiwygPod({ pod }) {
598599 ) ;
599600}
600601function Pod ( { id, draghandle } ) {
602+ console . log ( "Rendering pod" , id ) ;
601603 return (
602604 < PodWrapper id = { id } draghandle = { draghandle } >
603605 < ThePod id = { id } />
@@ -697,6 +699,7 @@ function PodDiff({ id, setShowDiff }) {
697699}
698700
699701function PodWrapper ( { id, draghandle, children } ) {
702+ // console.log("PodWrapper", id);
700703 const pod = useSelector ( ( state ) => state . repo . pods [ id ] ) ;
701704 const devmode = useSelector ( ( state ) => state . repo . dev ) ;
702705 const dispatch = useDispatch ( ) ;
@@ -955,7 +958,24 @@ function ThePod({ id }) {
955958 > </ Textarea >
956959 ) ;
957960 } else if ( pod . type === "CODE" ) {
958- return < CodePod id = { id } /> ;
961+ // return <Text>CODE</Text>;
962+ if ( pod . render ) {
963+ return < CodePod id = { id } /> ;
964+ } else {
965+ return (
966+ < Code
967+ onDoubleClick = { ( ) => {
968+ // console.log("Double clicked!");
969+ dispatch ( repoSlice . actions . setPodRender ( { id, value : true } ) ) ;
970+ } }
971+ whiteSpace = "pre-wrap"
972+ fontSize = "sm"
973+ >
974+ { pod . content }
975+ < Text > (Read-only)</ Text >
976+ </ Code >
977+ ) ;
978+ }
959979 } else if ( pod . type === "REPL" ) {
960980 return < ReplPod pod = { pod } /> ;
961981 } else if ( pod . type === "DECK" ) {
0 commit comments