mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
feat(desktop): bundled renderer, modules and instance accounts (#3254)
This commit is contained in:
1 parent
c748c8af4e
commit
7c5fa2180a
1275 files changed
+215074
-81246
No files matched your search
@@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import type {ReactNode} from 'react';
|
||||
|
||||
export function isAuthRenderableNode(value: ReactNode): boolean {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
if (typeof value === 'boolean') {
|
||||
return value;
|
||||
}
|
||||
if (typeof value === 'string') {
|
||||
return value.length > 0;
|
||||
}
|
||||
if (typeof value === 'number') {
|
||||
return value !== 0 && !Number.isNaN(value);
|
||||
}
|
||||
if (typeof value === 'bigint') {
|
||||
return value !== 0n;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in new issue
Block a user