Files
assetx/antdesign/check-imports.sh
default 2ee4553b71 init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、
antdesign(管理后台)、landingpage(营销落地页)、
数据库 SQL 和配置文件。
2026-03-27 11:26:43 +00:00

36 lines
989 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
echo "🔍 检查页面组件的导入问题"
echo "================================"
check_imports() {
local file=$1
echo ""
echo "检查: $file"
# 检查是否有未使用 @ 别名的相对路径
if grep -n "from '\.\." "$file" | head -5; then
echo "⚠️ 发现相对路径导入(可能导致问题)"
else
echo "✓ 导入路径正确"
fi
# 检查是否有 react-i18next
if grep -q "react-i18next" "$file"; then
echo "⚠️ 使用了 react-i18nextUmi 使用内置国际化)"
fi
}
# 检查所有新页面
check_imports "src/pages/Vault/Trade/index.tsx"
check_imports "src/pages/Vault/USDC/index.tsx"
check_imports "src/pages/LP/LPPanelNew.tsx"
check_imports "src/pages/Statistics/Holders/index.tsx"
check_imports "src/pages/Admin/Factory/index.tsx"
check_imports "src/pages/Admin/Lending/index.tsx"
check_imports "src/pages/Lending/User/index.tsx"
echo ""
echo "================================"
echo "✅ 检查完成"