在此处输入图像描述
AdminPanel.tsx
<Resource
options={{ label: 'Transactions' }}
icon={WorkIcon}
name={path}
list={TransactionsList}
/>
事务列表.tsx
const PostList = () => (
<ResourceContextProvider value={path}>
<List syncWithLocation {...props}>
<Datagrid >
<FullNameUserField label="User" source="userFirstName" />
<TextField label="Goal Type" source="savingGoalType" />
<TextField label="Goal name" source="savingGoalName" />
<TextField label="Target Amount" source="targetAmount" />
<SavingGoalCreationDateField label="Goal creation date" source="savingGoalCreationDate" />
<TextField label="Strategy Name" source="strategyName" />
<SavingGoalCreationDateField label="Target Date" source="targetDate" />
<TextField label="Status" source="savingGoalStatus" />
</Datagrid>
</List>
</ResourceContextProvider>)
<Tab label="comments" path="comments">
<PostLisst />
</Tab>
在此处输入图像描述
我无法显示请求的结果,为什么?
在中
const PostList = () => (...
我看不到你需要通过的道具,试着这样做:
const PostList = (props) =>