fix: wrap use with suspense

skill issue
This commit is contained in:
Ephraim Atta-Duncan
2024-03-29 11:14:44 +00:00
parent cc60437dcd
commit 81ab220f1e
2 changed files with 22 additions and 12 deletions

View File

@ -1,4 +1,6 @@
import type { Status } from '@openstatus/react';
import { use } from 'react';
import { type Status, getStatus } from '@openstatus/react';
import { cn } from '@documenso/ui/lib/utils';
@ -42,7 +44,8 @@ const getStatusLevel = (level: Status) => {
}[level];
};
export function StatusWidget({ status }: { status: Status }) {
export function StatusWidget() {
const { status } = use(getStatus('documenso-status'));
const level = getStatusLevel(status);
return (