File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
apps/events/src/components Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 1- import { preparePublish , useDeleteEntity , useUpdateEntity } from '@graphprotocol/hypergraph-react' ;
1+ import { useDeleteEntity , useUpdateEntity } from '@graphprotocol/hypergraph-react' ;
22import { useState } from 'react' ;
33import { User } from '../schema.js' ;
44import { Button } from './ui/button' ;
@@ -9,19 +9,13 @@ export const UserEntry = (user: User & { id: string }) => {
99 const updateEntity = useUpdateEntity ( User ) ;
1010 const [ editMode , setEditMode ] = useState ( false ) ;
1111
12- const handlePublish = async ( ) => {
13- const result = await preparePublish ( { entity : user , publicTargetSpace : 'abc' } ) ;
14- console . log ( result ) ;
15- } ;
16-
1712 return (
1813 < div key = { user . id } className = "flex flex-row items-center gap-2" >
1914 < h2 >
2015 { user . name } < span className = "text-xs text-gray-500" > ({ user . id } )</ span >
2116 </ h2 >
2217 < Button onClick = { ( ) => deleteEntity ( user . id ) } > Delete</ Button >
2318 < Button onClick = { ( ) => setEditMode ( ( prev ) => ! prev ) } > Edit User</ Button >
24- < Button onClick = { handlePublish } > Publish</ Button >
2519
2620 { editMode && (
2721 < Input type = "text" value = { user . name } onChange = { ( e ) => updateEntity ( user . id , { name : e . target . value } ) } />
You can’t perform that action at this time.
0 commit comments