Skip to content

Commit d96bda4

Browse files
seanemmerjhuleatt
authored andcommitted
update return type for AuthCheck and SuspenseWithPerf to JSX.Element (#162)
* update return type for AuthCheck and SuspenseWithPerf to JSX.Element * remove changes to yarn.lock * wrap AuthCheck fallback and children in React Fragment * fix brackets
1 parent 6bf1f31 commit d96bda4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

reactfire/auth/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export function AuthCheck({
9292
fallback,
9393
children,
9494
requiredClaims
95-
}: AuthCheckProps): React.ReactNode {
95+
}: AuthCheckProps): JSX.Element {
9696
const user = useUser<User>(auth);
9797

9898
if (user) {
@@ -105,9 +105,9 @@ export function AuthCheck({
105105
{children}
106106
</ClaimsCheck>
107107
) : (
108-
children
108+
<>{children}</>
109109
);
110110
} else {
111-
return fallback;
111+
return <>{fallback}</>;
112112
}
113113
}

reactfire/performance/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function SuspenseWithPerf({
3333
traceId,
3434
fallback,
3535
firePerf
36-
}: SuspensePerfProps) {
36+
}: SuspensePerfProps): JSX.Element {
3737
firePerf = firePerf || getPerfFromContext();
3838

3939
const Fallback = () => {

0 commit comments

Comments
 (0)