-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1309df2
commit 84ecb60
Showing
2 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ | |
.heading > a:hover { | ||
text-decoration: none; | ||
} | ||
|
||
.loading { | ||
height: 50vh; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
import { PluginOverview } from "@/app/client"; | ||
import { Flex, Text } from "@radix-ui/themes"; | ||
import { Suspense } from "react"; | ||
|
||
import { getAllPlugins } from "@/lib/registry"; | ||
|
||
import { PluginOverview } from "./client"; | ||
import style from "./layout.module.css"; | ||
|
||
export const revalidate = 300; | ||
|
||
function Loading() { | ||
return ( | ||
<Flex align="center" justify="center" className={style.loading}> | ||
<Text>Loading...</Text> | ||
</Flex> | ||
); | ||
} | ||
|
||
export default async function Home() { | ||
const plugins = await getAllPlugins(); | ||
plugins.sort((a, b) => a.FullName.localeCompare(b.FullName)); | ||
return <PluginOverview plugins={plugins} />; | ||
return ( | ||
<Suspense fallback={<Loading />}> | ||
<PluginOverview plugins={plugins} /> | ||
</Suspense> | ||
); | ||
} |