File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ Class](/sdk/storage/guide/rest/#遍历-class)。
6969
7070<Conditional region = " cn" >
7171
72- < h2 > 腾讯云 CloudBase</ h2 >
72+ ## 腾讯云 CloudBase
7373
7474我们推荐使用腾讯云 CloudBase 作为 LeanCloud 的替代方案。CloudBase 提供数据库、云函数、云存储、身份认证等与 LeanCloud
7575类似的能力,并配备完整迁移指南及智能迁移脚本,支持自动数据格式转换。
Original file line number Diff line number Diff line change 11import { BRAND , REGION } from "../constants/env" ;
2+ import React , { type ReactNode } from "react" ;
23
34interface ConditionalProps {
4- children : React . ReactElement [ ] ;
5+ children ?: ReactNode ;
56 brand ?: string ;
67 region ?: string ;
78 if ?: boolean ;
89}
910
1011export function Conditional ( props : ConditionalProps ) {
11-
12-
13-
1412 const { children, brand, region } = props ;
1513 if (
1614 ( ! brand || brand === BRAND ) &&
1715 ( ! region || region === REGION ) &&
1816 ( props . if === undefined || props . if )
1917 ) {
20- return children ;
18+ return < > { children } </ > ;
2119 } else {
2220 return null ;
2321 }
You can’t perform that action at this time.
0 commit comments