- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL - 修复 HomePage.tsx 中所有图片引用 - 修复 CoursePage.tsx 中所有图片引用 - 确保图片在 GitHub Pages 上正确加载 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
17 lines
1003 B
JavaScript
17 lines
1003 B
JavaScript
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports.useIsomorphicLayoutEffect = void 0;
|
|
|
|
var _react = require("react");
|
|
|
|
// React currently throws a warning when using useLayoutEffect on the server.
|
|
// To get around it, we can conditionally useEffect on the server (no-op) and
|
|
// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store
|
|
// subscription callback always has the selector from the latest render commit
|
|
// available, otherwise a store update may happen between render and the effect,
|
|
// which may cause missed updates; we also must ensure the store subscription
|
|
// is created synchronously, otherwise a store update may occur before the
|
|
// subscription is created and an inconsistent state may be observed
|
|
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? _react.useLayoutEffect : _react.useEffect;
|
|
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect; |