We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f9fdd3 commit 62d40e7Copy full SHA for 62d40e7
web/src/components/panel/GenericPanel.tsx
@@ -101,13 +101,15 @@ function GenericPanel({
101
contentClassName // This should now define the padding e.g. 'p-3 md:p-4'
102
)}
103
>
104
- {isLoading ? (
105
- <LoadingSpinner />
106
- ) : error ? (
107
- <div className="p-3 text-center text-red-500 md:p-4">{error}</div>
108
- ) : (
109
- children
110
- )}
+ {(() => {
+ if (isLoading) {
+ return <LoadingSpinner />;
+ }
+ if (error) {
+ return <div className="p-3 text-center text-red-500 md:p-4">{error}</div>;
111
+ return children;
112
+ })()}
113
</div>
114
</GlassContainer>
115
);
0 commit comments