Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit efc93b7

Browse files
committed
feat: display previously created apps when provider is not configured
1 parent 1eda0e9 commit efc93b7

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

src/pages/apps/Apps.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,17 @@ export default function Apps() {
4242
);
4343

4444
const provider = LocalStorage.get<Provider>(LS_PROVIDER);
45-
const newAppHref = `/apps/new/${provider}`;
45+
46+
if (loading && !filter) {
47+
return (
48+
<Box sx={{ width: "100%", position: "relative", mt: -2 }}>
49+
<Card loading={true} />
50+
</Box>
51+
);
52+
}
4653

4754
// This can happen if the self-hosted user has no provider configured
48-
if (!provider) {
55+
if (!provider && apps.length === 0) {
4956
return (
5057
<Box sx={{ width: "100%" }} maxWidth="lg">
5158
<Card sx={{ px: { xs: 1, md: 4 } }}>
@@ -62,9 +69,15 @@ export default function Apps() {
6269
);
6370
}
6471

65-
const importFromProvider = `Import from ${providerToText[provider]}`;
72+
const importFromProvider = provider
73+
? `Import from ${providerToText[provider]}`
74+
: "Configure authentication";
75+
76+
const newAppHref = provider
77+
? `/apps/new/${provider}`
78+
: "https://www.stormkit.io/docs/welcome/self-hosting#authentication";
6679

67-
if (apps.length === 0 && !loading && !filter) {
80+
if (apps.length === 0 && !filter) {
6881
return (
6982
<Box sx={{ width: "100%" }} maxWidth="lg">
7083
<Card sx={{ px: { xs: 1, md: 4 } }}>

0 commit comments

Comments
 (0)