refactor(api): 统一API路径配置并优化相关服务调用
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
feat: 添加API URL全局配置文件 fix: 修复SSR环境下的窗口对象检查 perf: 优化代理配置路径匹配顺序 style: 移除无用注释和未使用的类型声明
This commit is contained in:
@@ -48,6 +48,9 @@ const CommentList: React.FC<CommentListProps> = ({
|
||||
}) => {
|
||||
// Sort comments chronologically (oldest first)
|
||||
const sortedComments = useMemo(() => {
|
||||
if (!comments || !Array.isArray(comments)) {
|
||||
return [];
|
||||
}
|
||||
return [...comments].sort((a, b) => {
|
||||
return new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user