hunk.code_window:   return null;
   }
   /**
    * subscribe LiveData and return the value.
    */
   export function useLiveData<Input extends LiveData<any> | null | undefined>(
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit: function undefinedGetSnapshot() {
     return undefined;
   }
  
hunk.file_path: packages/common/infra/src/livedata/react.ts
hunk.type: add
file: import { forwardRef, type HTMLAttributes } from 'react';
  
  const formatTime = (time: number): string => {
    const minutes = Math.floor(time / 60);
    const seconds = time % 60;
  
    const formattedMinutes = minutes.toString().padStart(2, '0');
    const formattedSeconds = seconds.toString().padStart(2, '0');
  
    return `${formattedMinutes}:${formattedSeconds}`;
  };
  
  export const CountDownRender = forwardRef<
    HTMLDivElement,
    { timeLeft: number } & HTMLAttributes<HTMLDivElement>
  >(({ timeLeft, ...props }, ref) => {
    return (
      <div {...props} ref={ref}>
        {formatTime(timeLeft)}
      </div>
    );
  });
  
  CountDownRender.displayName = 'CountDownRender';
  