All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m16s
29 lines
607 B
TypeScript
29 lines
607 B
TypeScript
'use client';
|
|
|
|
import { EditableTitle } from './EditableTitle';
|
|
import { updateWeatherSession } from '@/actions/weather';
|
|
|
|
interface EditableWeatherTitleProps {
|
|
sessionId: string;
|
|
initialTitle: string;
|
|
isOwner: boolean;
|
|
}
|
|
|
|
export function EditableWeatherTitle({
|
|
sessionId,
|
|
initialTitle,
|
|
isOwner,
|
|
}: EditableWeatherTitleProps) {
|
|
return (
|
|
<EditableTitle
|
|
sessionId={sessionId}
|
|
initialTitle={initialTitle}
|
|
isOwner={isOwner}
|
|
onUpdate={async (id, title) => {
|
|
const result = await updateWeatherSession(id, { title });
|
|
return result;
|
|
}}
|
|
/>
|
|
);
|
|
}
|