dashboard: add retention and quick fix loading states
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import withSuspense from '@/hocs/with-suspense';
|
||||
|
||||
import { getLiveVisitors } from '@openpanel/db';
|
||||
|
||||
import type { LiveCounterProps } from './live-counter';
|
||||
import LiveCounter from './live-counter';
|
||||
|
||||
export default async function ServerLiveCounter(
|
||||
props: Omit<LiveCounterProps, 'data'>
|
||||
) {
|
||||
async function ServerLiveCounter(props: Omit<LiveCounterProps, 'data'>) {
|
||||
const count = await getLiveVisitors(props.projectId);
|
||||
return <LiveCounter data={count} {...props} />;
|
||||
}
|
||||
|
||||
export default withSuspense(ServerLiveCounter, () => <div />);
|
||||
|
||||
Reference in New Issue
Block a user