1- import { useValues } from 'kea'
1+ import { BindLogic , useValues } from 'kea'
22
33import { uuid } from 'lib/utils'
44import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
55import { Notebook } from 'scenes/notebooks/Notebook/Notebook'
6+ import { notebookLogic } from 'scenes/notebooks/Notebook/notebookLogic'
67
78import { AnyPropertyFilter , PersonType , PropertyFilterType , PropertyOperator } from '~/types'
89
@@ -15,6 +16,8 @@ const PersonFeedCanvas = ({ person }: PersonFeedCanvasProps): JSX.Element => {
1516
1617 const id = person . id
1718 const distinctId = person . distinct_ids [ 0 ]
19+ const shortId = `canvas-${ id } `
20+ const mode = 'canvas'
1821
1922 const personFilter : AnyPropertyFilter [ ] = [
2023 {
@@ -26,60 +29,61 @@ const PersonFeedCanvas = ({ person }: PersonFeedCanvasProps): JSX.Element => {
2629 ]
2730
2831 return (
29- < Notebook
30- editable = { false }
31- shortId = { `canvas-${ id } ` }
32- mode = "canvas"
33- canvasFiltersOverride = { personFilter }
34- initialContent = { {
35- type : 'doc' ,
36- content : [
37- { type : 'ph-usage-metrics' , attrs : { personId : id , nodeId : uuid ( ) } } ,
38- {
39- type : 'ph-person-feed' ,
40- attrs : {
41- height : null ,
42- title : null ,
43- nodeId : uuid ( ) ,
44- id,
45- distinctId,
46- __init : null ,
47- children : [
48- {
49- type : 'ph-person' ,
50- attrs : { id, distinctId, nodeId : uuid ( ) , title : 'Info' } ,
51- } ,
52- ...( isCloudOrDev
53- ? [
54- {
55- type : 'ph-map' ,
56- attrs : { id, distinctId, nodeId : uuid ( ) } ,
57- } ,
58- ]
59- : [ ] ) ,
60- {
61- type : 'ph-person-properties' ,
62- attrs : { id, distinctId, nodeId : uuid ( ) } ,
63- } ,
64- { type : 'ph-related-groups' , attrs : { id, nodeId : uuid ( ) , type : 'group' } } ,
65- ] ,
32+ < BindLogic logic = { notebookLogic } props = { { shortId, mode, canvasFiltersOverride : personFilter } } >
33+ < Notebook
34+ editable = { false }
35+ shortId = { shortId }
36+ mode = { mode }
37+ initialContent = { {
38+ type : 'doc' ,
39+ content : [
40+ { type : 'ph-usage-metrics' , attrs : { personId : id , nodeId : uuid ( ) } } ,
41+ {
42+ type : 'ph-person-feed' ,
43+ attrs : {
44+ height : null ,
45+ title : null ,
46+ nodeId : uuid ( ) ,
47+ id,
48+ distinctId,
49+ __init : null ,
50+ children : [
51+ {
52+ type : 'ph-person' ,
53+ attrs : { id, distinctId, nodeId : uuid ( ) , title : 'Info' } ,
54+ } ,
55+ ...( isCloudOrDev
56+ ? [
57+ {
58+ type : 'ph-map' ,
59+ attrs : { id, distinctId, nodeId : uuid ( ) } ,
60+ } ,
61+ ]
62+ : [ ] ) ,
63+ {
64+ type : 'ph-person-properties' ,
65+ attrs : { id, distinctId, nodeId : uuid ( ) } ,
66+ } ,
67+ { type : 'ph-related-groups' , attrs : { id, nodeId : uuid ( ) , type : 'group' } } ,
68+ ] ,
69+ } ,
6670 } ,
67- } ,
68- {
69- type : 'ph-llm-trace' ,
70- attrs : { personId : id , nodeId : uuid ( ) } ,
71- } ,
72- {
73- type : 'ph-zendesk-tickets' ,
74- attrs : { personId : id , nodeId : uuid ( ) } ,
75- } ,
76- {
77- type : 'ph-issues' ,
78- attrs : { personId : id , nodeId : uuid ( ) } ,
79- } ,
80- ] ,
81- } }
82- / >
71+ {
72+ type : 'ph-llm-trace' ,
73+ attrs : { personId : id , nodeId : uuid ( ) } ,
74+ } ,
75+ {
76+ type : 'ph-zendesk-tickets' ,
77+ attrs : { personId : id , nodeId : uuid ( ) } ,
78+ } ,
79+ {
80+ type : 'ph-issues' ,
81+ attrs : { personId : id , nodeId : uuid ( ) } ,
82+ } ,
83+ ] ,
84+ } }
85+ />
86+ </ BindLogic >
8387 )
8488}
8589
0 commit comments