import React from 'react'; import { Card, CardContent, Typography, Link, Divider, List, ListItem, ListItemText, Radio, RadioGroup, FormControlLabel } from '@mui/material'; function NodeContent({ node }) { if (!node) return null; return ( {node.title} {/* 內容區 */} 內容
{/* 資源連結 */} {node.resources && ( <> 延伸資源 {node.resources.map((resource, index) => ( {resource.type}: {resource.url} ))} )} {/* AI 對話記錄 */} {node.aiChats && ( <> AI 對話記錄 {node.aiChats.map((chat, index) => ( Q: {chat.question}} secondary={`A: ${chat.answer}`} /> ))} )} {/* 練習區 */} {node.exercises && ( <> 練習題 {node.exercises.map((exercise) => (
{exercise.question} {exercise.type === 'multiple_choice' && ( {exercise.options.map((option, index) => ( } label={option} /> ))} )}
))} )} ); } export default NodeContent;