feature(dashboard): refactor overview

fix(lint)
This commit is contained in:
Carl-Gerhard Lindesvärd
2025-03-20 09:28:54 +01:00
committed by Carl-Gerhard Lindesvärd
parent b035c0d586
commit a1eb4a296f
83 changed files with 59167 additions and 32403 deletions

View File

@@ -32,7 +32,7 @@ export function ModalHeader({
return (
<div
className={cn(
'relative -m-6 mb-6 flex justify-between rounded-t-lg bg-gradient-to-b from-def-300 to-background p-6 pb-0',
'relative -m-6 mb-4 flex justify-between rounded-t-lg bg-gradient-to-b from-def-300 to-background p-6 pb-0',
className,
)}
style={{}}

View File

@@ -13,13 +13,14 @@ import { ModalContent, ModalHeader } from './Modal/Container';
interface Props {
id: string;
createdAt?: Date;
projectId: string;
}
export default function EventDetails({ id }: Props) {
const { projectId } = useAppParams();
export default function EventDetails({ id, createdAt, projectId }: Props) {
const [, setEvents] = useEventQueryNamesFilter();
const [, setFilter] = useEventQueryFilters();
const query = api.event.byId.useQuery({ id, projectId });
const query = api.event.byId.useQuery({ id, projectId, createdAt });
if (query.isLoading || query.isFetching) {
return null;

View File

@@ -1,6 +1,6 @@
'use client';
import { Loader } from 'lucide-react';
import { Loader2Icon } from 'lucide-react';
import dynamic from 'next/dynamic';
import { createPushModal } from 'pushmodal';
@@ -9,11 +9,23 @@ import { ModalContent } from './Modal/Container';
const Loading = () => (
<ModalContent className="flex items-center justify-center p-16">
<Loader className="animate-spin" size={40} />
<Loader2Icon className="animate-spin" size={40} />
</ModalContent>
);
const modals = {
OverviewTopPagesModal: dynamic(
() => import('../components/overview/overview-top-pages-modal'),
{
loading: Loading,
},
),
OverviewTopGenericModal: dynamic(
() => import('../components/overview/overview-top-generic-modal'),
{
loading: Loading,
},
),
RequestPasswordReset: dynamic(() => import('./request-reset-password'), {
loading: Loading,
}),