refactor(api): 统一API路径配置并优化相关服务调用
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:
2026-02-27 10:07:03 +08:00
parent 97e4a135e1
commit c1a88ea4da
29 changed files with 392 additions and 225 deletions

View File

@@ -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();
});