-
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
Showing
19 changed files
with
411 additions
and
218 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,5 +1,11 @@ | ||
import PageBreadcrumb from '@/_components/page-breadcrumb'; | ||
import Spinner from '@/_components/spinner'; | ||
|
||
const Loading = () => <Spinner className="mx-auto" />; | ||
const Loading = () => ( | ||
<> | ||
<PageBreadcrumb skeleton /> | ||
<Spinner className="mx-auto" /> | ||
</> | ||
); | ||
|
||
export default Loading; |
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,22 @@ | ||
import Notifications from '@/_components/notifications'; | ||
import PageBreadcrumb from '@/_components/page-breadcrumb'; | ||
import getCurrentUser from '@/_queries/get-current-user'; | ||
import listNotifications from '@/_queries/list-notifications'; | ||
|
||
const Page = async () => { | ||
const { data: notifications } = await listNotifications(); | ||
return <Notifications notifications={notifications} />; | ||
const [{ data: notifications }, user] = await Promise.all([ | ||
listNotifications(), | ||
getCurrentUser(), | ||
]); | ||
|
||
if (!notifications || !user) return null; | ||
|
||
return ( | ||
<> | ||
<PageBreadcrumb last="Inbox" /> | ||
<Notifications notifications={notifications} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default Page; |
This file was deleted.
Oops, something went wrong.
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,5 +1,11 @@ | ||
import PageBreadcrumb from '@/_components/page-breadcrumb'; | ||
import Spinner from '@/_components/spinner'; | ||
|
||
const Loading = () => <Spinner className="mx-auto" />; | ||
const Loading = () => ( | ||
<> | ||
<PageBreadcrumb skeleton /> | ||
<Spinner className="mx-auto" /> | ||
</> | ||
); | ||
|
||
export default Loading; |
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,5 +1,11 @@ | ||
import PageBreadcrumb from '@/_components/page-breadcrumb'; | ||
import Spinner from '@/_components/spinner'; | ||
|
||
const Loading = () => <Spinner className="mx-auto" />; | ||
const Loading = () => ( | ||
<> | ||
<PageBreadcrumb skeleton /> | ||
<Spinner className="mx-auto" /> | ||
</> | ||
); | ||
|
||
export default Loading; |
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
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
Oops, something went wrong.