mirror of
https://github.com/docmost/docmost.git
synced 2026-09-02 11:55:35 +08:00
refactor(base): rename baseId to pageId in client components
This commit is contained in:
@@ -72,7 +72,7 @@ export function CellFile({
|
||||
try {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
formData.append("baseId", property.baseId);
|
||||
formData.append("pageId", property.pageId);
|
||||
|
||||
const res = await api.post<FileValue>(
|
||||
"/bases/files/upload",
|
||||
@@ -98,7 +98,7 @@ export function CellFile({
|
||||
setUploading(false);
|
||||
onCommit(newFiles.length > 0 ? newFiles : null);
|
||||
},
|
||||
[files, property.baseId, onCommit],
|
||||
[files, property.pageId, onCommit],
|
||||
);
|
||||
|
||||
const handleKeyDown = useCallback(
|
||||
|
||||
@@ -105,7 +105,7 @@ export function CellMultiSelect({
|
||||
const newChoices = [...choices, newChoice];
|
||||
updatePropertyMutation.mutate({
|
||||
propertyId: property.id,
|
||||
baseId: property.baseId,
|
||||
pageId: property.pageId,
|
||||
typeOptions: {
|
||||
...typeOptions,
|
||||
choices: newChoices,
|
||||
|
||||
@@ -44,7 +44,7 @@ export function CellPage({
|
||||
onCancel,
|
||||
}: CellPageProps) {
|
||||
const pageId = parsePageId(value);
|
||||
const { data: base } = useBaseQuery(property.baseId);
|
||||
const { data: base } = useBaseQuery(property.pageId);
|
||||
|
||||
const ids = useMemo(() => (pageId ? [pageId] : []), [pageId]);
|
||||
const { pages } = useResolvedPages(ids);
|
||||
|
||||
@@ -102,7 +102,7 @@ export function CellSelect({
|
||||
const newChoices = [...choices, newChoice];
|
||||
updatePropertyMutation.mutate({
|
||||
propertyId: property.id,
|
||||
baseId: property.baseId,
|
||||
pageId: property.pageId,
|
||||
typeOptions: {
|
||||
...typeOptions,
|
||||
choices: newChoices,
|
||||
|
||||
Reference in New Issue
Block a user