权限管理中NoAuthFallback报错
yymelo opened this issue · comments
yymelo commented
Describe the bug
export const authConfig = defineAuthConfig(async appData => {
const { currentUser = {} } = appData
if (!currentUser?.enabled) {
history?.push('/');
}
return {
initialAuth: {
user: currentUser?.id ? true : false,
},
NoAuthFallback: (routeConfig) => {
console.log('routeConfig ', routeConfig);
return (
<div>123</div>
)
},
}
})
上述代码中
123
部分标红报错
Expected behavior
Actual behavior
代码报错无法编译
Version of ice.js
3.3.0
Content of build.json or ice.config.mts
No response
Additional context
No response
ClarkXia commented
提供下具体编译错误信息
yymelo commented
yymelo commented
脑子不清醒,官方文档给的是tsx,工程里起来的是ts。。。。没注意,犯傻了