diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellUrl.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellUrl.tsx index 9b7e62c0f8..6c7d7b1851 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellUrl.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/EditCellUrl.tsx @@ -10,34 +10,22 @@ export const EditCellUrl = ({ data: URLCellDataPB | undefined; cellController: CellController; }) => { - const [url, setUrl] = useState(''); - const [content, setContent] = useState(''); + const [value, setValue] = useState(''); useEffect(() => { - setUrl((data as URLCellDataPB)?.url || ''); + setValue((data as URLCellDataPB)?.url || ''); }, [data]); const save = async () => { - await (cellController as URLCellController)?.saveCellData(url); - // console.log('saving url'); + await (cellController as URLCellController)?.saveCellData(value); }; return ( -
- - setUrl(e.target.value)} - className={'-mx-2 mb-4 rounded bg-white px-2 py-1'} - onBlur={() => save()} - /> - - setContent(e.target.value)} - className={'-mx-2 mb-2 rounded bg-white px-2 py-1'} - onBlur={() => save()} - /> -
+ setValue(e.target.value)} + onBlur={() => save()} + className={'w-full px-4 py-2'} + > ); };