Formated Files

This commit is contained in:
Ahmad 2024-02-15 20:49:19 -05:00
parent d5631b309a
commit e768d9181f
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
138 changed files with 1829 additions and 1851 deletions

View file

@ -1,27 +1,27 @@
import { auth } from "@clerk/nextjs";
import { redirect } from "next/navigation";
import { auth } from '@clerk/nextjs';
import { redirect } from 'next/navigation';
import { db } from "@/lib/db";
import { ActivityItem } from "@/components/activity-item";
import { Skeleton } from "@/components/ui/skeleton";
import { db } from '@/lib/db';
import { ActivityItem } from '@/components/activity-item';
import { Skeleton } from '@/components/ui/skeleton';
export const ActivityList = async () => {
const { orgId } = auth();
if (!orgId) redirect("/select-org");
if (!orgId) redirect('/select-org');
const auditLogs = await db.auditLog.findMany({
where: {
orgId,
},
orderBy: {
createdAt: "desc",
createdAt: 'desc',
},
});
return (
<ol className="space-y-4 mt-4">
<p className="hidden last:block text-xs text-center text-muted-foreground">
<ol className='mt-4 space-y-4'>
<p className='hidden text-center text-xs text-muted-foreground last:block'>
No activity found inside this organization
</p>
{auditLogs.map((log) => (
@ -33,12 +33,12 @@ export const ActivityList = async () => {
ActivityList.Skeleton = function ActivityListSkeleton() {
return (
<ol className="space-y-4 mt-4">
<Skeleton className="w-[80%] h-14" />
<Skeleton className="w-[50%] h-14" />
<Skeleton className="w-[70%] h-14" />
<Skeleton className="w-[80%] h-14" />
<Skeleton className="w-[75%] h-14" />
<ol className='mt-4 space-y-4'>
<Skeleton className='h-14 w-[80%]' />
<Skeleton className='h-14 w-[50%]' />
<Skeleton className='h-14 w-[70%]' />
<Skeleton className='h-14 w-[80%]' />
<Skeleton className='h-14 w-[75%]' />
</ol>
);
};

View file

@ -1,18 +1,18 @@
import { Suspense } from "react";
import { Suspense } from 'react';
import { Separator } from "@/components/ui/separator";
import { Separator } from '@/components/ui/separator';
import { Info } from "../_components/info";
import { ActivityList } from "./_components/activity-list";
import { checkSubscription } from "@/lib/subscription";
import { Info } from '../_components/info';
import { ActivityList } from './_components/activity-list';
import { checkSubscription } from '@/lib/subscription';
const ActivityPage = async () => {
const isPro = await checkSubscription();
return (
<div className="w-full">
<div className='w-full'>
<Info isPro={isPro} />
<Separator className="my-2" />
<Separator className='my-2' />
<Suspense fallback={<ActivityList.Skeleton />}>
<ActivityList />
</Suspense>