import { getDB , setDB } from '../commentDB' ; export const saveDeletedComment = async ( commentId ) => { const savedComments = await getDB ( ) ; const thisSavedComment = savedComments [ commentId ] ; if ( ! thisSavedComment ) { return ; } savedComments [ commentId ] = Object . assign ( { } , thisSavedComment , { selfDeleted : true } ) ; await setDB ( savedComments ) ; } ;