-
- {isMobile ? (
-
- ) : (
-
- )}
+ return (
+
+
+ {isMobile ? (
+
+ ) : (
+
+ )}
+
-
- );
-};
+ );
+ },
+ (prevProps, nextProps) => {
+ const prev = prevProps.post;
+ const next = nextProps.post;
+ return (
+ prev?.cid === next?.cid &&
+ prev?.replyCount === next?.replyCount &&
+ prev?.updatedAt === next?.updatedAt &&
+ prev?.locked === next?.locked &&
+ prev?.pinned === next?.pinned &&
+ prev?.removed === next?.removed &&
+ prev?.deleted === next?.deleted &&
+ prevProps.showAllReplies === nextProps.showAllReplies &&
+ prevProps.showReplies === nextProps.showReplies &&
+ prevProps.targetReplyCid === nextProps.targetReplyCid &&
+ prevProps.isModQueue === nextProps.isModQueue &&
+ prevProps.modQueueStatus === nextProps.modQueueStatus
+ );
+ },
+);
const PostPage = () => {
const { t } = useTranslation();
diff --git a/vite.config.js b/vite.config.js
index 3417b1ee..d2fff3f9 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -182,6 +182,15 @@ export default defineConfig({
if (/[\\/]node_modules[\\/](react|react-dom|react-router-dom|react-i18next|i18next|i18next-browser-languagedetector|i18next-http-backend)[\\/]/.test(id)) {
return 'vendor';
}
+ if (/[\\/]node_modules[\\/](react-markdown|remark-|rehype-|unified|micromark|mdast|hast|unist)[\\/]/.test(id)) {
+ return 'markdown';
+ }
+ if (/[\\/]node_modules[\\/](react-virtuoso)[\\/]/.test(id)) {
+ return 'virtuoso';
+ }
+ if (/[\\/]node_modules[\\/](@floating-ui)[\\/]/.test(id)) {
+ return 'floating-ui';
+ }
},
},
},