const fs = require('fs');
const path = require('path');
function checkSyntax() {
try {
console.log('🔍 检查个人资料页面语法...');
const profilePath = path.join(__dirname, 'src', 'app', 'profile', 'page.tsx');
if (!fs.existsSync(profilePath)) {
console.log('❌ 个人资料页面文件不存在');
return false;
}
const content = fs.readFileSync(profilePath, 'utf8');
// 检查基本的语法结构
const checks = [
{
name: 'ProtectedRoute 组件导入',
test: content.includes("import { ProtectedRoute } from '@/components/auth/ProtectedRoute'")
},
{
name: 'ProtectedRoute 组件使用',
test: content.includes('