TextBook.tsx 806 B

12345678910111213141516171819202122232425262728293031
  1. import { Col, Row } from "antd";
  2. import { useNavigate } from "react-router-dom";
  3. import AnthologyDetail from "../article/AnthologyDetail";
  4. interface IWidget {
  5. anthologyId?: string;
  6. courseId?: string;
  7. }
  8. const TextBookWidget = ({ anthologyId, courseId }: IWidget) => {
  9. const navigate = useNavigate();
  10. console.log("anthologyId", anthologyId);
  11. return (
  12. <div style={{ backgroundColor: "#f5f5f5" }}>
  13. <Row>
  14. <Col flex="auto"></Col>
  15. <Col flex="960px">
  16. <AnthologyDetail
  17. aid={anthologyId}
  18. onArticleSelect={(keys: string[]) => {
  19. navigate(`/article/textbook/${courseId}_${keys[0]}?mode=read`);
  20. }}
  21. />
  22. </Col>
  23. <Col flex="auto"></Col>
  24. </Row>
  25. </div>
  26. );
  27. };
  28. export default TextBookWidget;