'use client' import type { App } from '@/types/app' import * as React from 'react' import { useTranslation } from 'react-i18next' import { AppTypeIcon } from '@/app/components/app/type-selector' import AppIcon from '@/app/components/base/app-icon' import { useAppContext } from '@/context/app-context' import { useFormatTimeFromNow } from '@/hooks/use-format-time-from-now' import Link from '@/next/link' import { getRedirectionPath } from '@/utils/app-redirection' type ContinueWorkItemProps = { app: App } const ContinueWorkItem = ({ app, }: ContinueWorkItemProps) => { const { t } = useTranslation() const { formatTimeFromNow } = useFormatTimeFromNow() const { isCurrentWorkspaceEditor } = useAppContext() const updatedAt = (app.updated_at || app.created_at) * 1000 const href = getRedirectionPath(Boolean(isCurrentWorkspaceEditor), app) return (

{app.name}

{app.author_name} ยท {t('continueWork.editedAt', { ns: 'explore', time: formatTimeFromNow(updatedAt) })}
) } export default React.memo(ContinueWorkItem)