import { DataObjectFactory , } from "@fluidframework/aqueduct" ; import { SyncedDataObject , setSyncedCounterConfig , setSyncedStringConfig , } from "@fluid-experimental/react" ; import { SharedCounter } from "@fluidframework/counter" ; import { SharedString } from "@fluidframework/sequence" ; const defaultImgUrl = "https://picsum.photos/id/221/1200/800" ; export class Likes extends SyncedDataObject { public static get Name ( ) { return "Likes" ; } public static readonly factory = new DataObjectFactory ( Likes . name , Likes , [ SharedCounter . getFactory ( ) , SharedString . getFactory ( ) , ] , { } ) ; constructor ( props ) { super ( props ) ; setSyncedCounterConfig ( this , "likes" ) ; setSyncedStringConfig ( this , "imgUrl" , defaultImgUrl ) ; } }