Skip to content

Commit

Permalink
update components to @propdock
Browse files Browse the repository at this point in the history
  • Loading branch information
Codehagen committed Aug 22, 2024
1 parent 23a824f commit e669dcc
Show file tree
Hide file tree
Showing 158 changed files with 1,534 additions and 1,661 deletions.
5 changes: 2 additions & 3 deletions apps/www/src/app/(analytics)/analytics/[id]/dcf/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import Link from "next/link"
import { getAnalysisDetails } from "@/actions/get-analysis-details"

import { Button } from "@dingify/ui/components/button"
import { Button } from "@propdock/ui/components/button"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from "@dingify/ui/components/tabs"
} from "@propdock/ui/components/tabs"

import { AnalysisDiagramDCF } from "@/components/analyse/AnalysisDiagramDCF"
import { AnalysisTableDCF } from "@/components/analyse/AnalysisTableDCF"
Expand Down
5 changes: 2 additions & 3 deletions apps/www/src/app/(analytics)/analytics/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import Link from "next/link"
import { getAnalysisDetails } from "@/actions/get-analysis-details"

import { Button } from "@dingify/ui/components/button"
import { Button } from "@propdock/ui/components/button"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from "@dingify/ui/components/tabs"
} from "@propdock/ui/components/tabs"

import { AnalysisDetailsTable } from "@/components/analyse/AnalysisDetailsTable"
import { AnalysisInfoCard } from "@/components/analyse/AnalysisInfoCard"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Link from "next/link"
import { getAnalysisDetails } from "@/actions/get-analysis-details"

import { Button } from "@dingify/ui/components/button"
import { Button } from "@propdock/ui/components/button"

import { SensitivityAnalysisTable } from "@/components/analyse/SensitivityAnalysisTable"
import { DashboardHeader } from "@/components/dashboard/header"
Expand Down
10 changes: 5 additions & 5 deletions apps/www/src/app/(analytics)/analytics/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Button } from "@dingify/ui/components/button";
import { Button } from "@propdock/ui/components/button"

import { DashboardHeader } from "@/components/dashboard/header";
import { DashboardShell } from "@/components/dashboard/shell";
import { CardSkeleton } from "@/components/shared/card-skeleton";
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
import { CardSkeleton } from "@/components/shared/card-skeleton"

export default function DashboardLoading() {
return (
Expand All @@ -17,5 +17,5 @@ export default function DashboardLoading() {
<CardSkeleton />
</div>
</DashboardShell>
);
)
}
7 changes: 3 additions & 4 deletions apps/www/src/app/(analytics)/analytics/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
import Link from "next/link"
import { redirect } from "next/navigation"
import { getAnalyses } from "@/actions/get-analyst"

import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@dingify/ui/components/card"
} from "@propdock/ui/components/card"
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@dingify/ui/components/table"
} from "@propdock/ui/components/table"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from "@dingify/ui/components/tabs"
} from "@propdock/ui/components/tabs"

import { authOptions } from "@/lib/auth"
import { prisma } from "@/lib/db"
Expand Down
20 changes: 10 additions & 10 deletions apps/www/src/app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { Metadata } from "next";
import { Suspense } from "react";
import Link from "next/link";
import { UserAuthForm } from "@/components/forms/user-auth-form";
import { Icons } from "@/components/shared/icons";
import { cn } from "@/lib/utils";
import type { Metadata } from "next"
import { Suspense } from "react"
import Link from "next/link"
import { buttonVariants } from "@propdock/ui/components/button"

import { buttonVariants } from "@dingify/ui/components/button";
import { cn } from "@/lib/utils"
import { UserAuthForm } from "@/components/forms/user-auth-form"
import { Icons } from "@/components/shared/icons"

export const metadata: Metadata = {
title: "Login",
description: "Login to your account",
};
}

export default function LoginPage() {
return (
Expand All @@ -19,7 +19,7 @@ export default function LoginPage() {
href="/"
className={cn(
buttonVariants({ variant: "outline", size: "sm" }),
"absolute left-4 top-4 md:left-8 md:top-8"
"absolute left-4 top-4 md:left-8 md:top-8",
)}
>
<>
Expand Down Expand Up @@ -50,5 +50,5 @@ export default function LoginPage() {
</p>
</div>
</div>
);
)
}
3 changes: 1 addition & 2 deletions apps/www/src/app/(auth)/register/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Suspense } from "react"
import Link from "next/link"

import { buttonVariants } from "@dingify/ui/components/button"
import { buttonVariants } from "@propdock/ui/components/button"

import { cn } from "@/lib/utils"
import { UserAuthForm } from "@/components/forms/user-auth-form"
Expand Down
32 changes: 16 additions & 16 deletions apps/www/src/app/(dashboard)/dashboard/billing/page.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import { redirect } from "next/navigation";
import { BillingInfo } from "@/components/billing-info";
import { LanugageButton } from "@/components/buttons/LanguageButton";
import { DashboardHeader } from "@/components/dashboard/header";
import { DashboardShell } from "@/components/dashboard/shell";
import { Icons } from "@/components/shared/icons";
import { authOptions } from "@/lib/auth";
import { getCurrentUser } from "@/lib/session";
import { getUserSubscriptionPlan } from "@/lib/subscription";

import { redirect } from "next/navigation"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@dingify/ui/components/alert";
} from "@propdock/ui/components/alert"

import { authOptions } from "@/lib/auth"
import { getCurrentUser } from "@/lib/session"
import { getUserSubscriptionPlan } from "@/lib/subscription"
import { BillingInfo } from "@/components/billing-info"
import { LanugageButton } from "@/components/buttons/LanguageButton"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
import { Icons } from "@/components/shared/icons"

export const metadata = {
title: "Dingity Billing - Subscription Management",
description:
"Access and manage your billing information, view subscription plans, and update payment methods on Dingity's Billing page.",
};
}

export default async function BillingPage() {
const user = await getCurrentUser();
const user = await getCurrentUser()

if (!user) {
redirect(authOptions.pages?.signIn || "/login");
redirect(authOptions.pages?.signIn || "/login")
}

const subscriptionPlan = await getUserSubscriptionPlan(user.id);
const subscriptionPlan = await getUserSubscriptionPlan(user.id)

return (
<DashboardShell>
Expand Down Expand Up @@ -57,5 +57,5 @@ export default async function BillingPage() {
</div>
{/* <LanugageButton userId={user.id} /> */}
</DashboardShell>
);
)
}
10 changes: 5 additions & 5 deletions apps/www/src/app/(dashboard)/dashboard/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Button } from "@dingify/ui/components/button";
import { Button } from "@propdock/ui/components/button"

import { DashboardHeader } from "@/components/dashboard/header";
import { DashboardShell } from "@/components/dashboard/shell";
import { CardSkeleton } from "@/components/shared/card-skeleton";
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
import { CardSkeleton } from "@/components/shared/card-skeleton"

export default function DashboardLoading() {
return (
Expand All @@ -17,5 +17,5 @@ export default function DashboardLoading() {
<CardSkeleton />
</div>
</DashboardShell>
);
)
}
35 changes: 17 additions & 18 deletions apps/www/src/app/(dashboard)/dashboard/notifications/page.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
import { redirect } from "next/navigation";
import { getMetricsForUser } from "@/actions/Dingify/get-metrics-user";
import { getNotificationSettings } from "@/actions/Dingify/get-notification-settings";

import { redirect } from "next/navigation"
import { getMetricsForUser } from "@/actions/Dingify/get-metrics-user"
import { getNotificationSettings } from "@/actions/Dingify/get-notification-settings"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@dingify/ui/components/card";
} from "@propdock/ui/components/card"

import { authOptions } from "@/lib/auth";
import { getCurrentUser } from "@/lib/session";
import { DashboardHeader } from "@/components/dashboard/header";
import { DashboardShell } from "@/components/dashboard/shell";
import { LanguageForm2 } from "@/components/forms/language-form2";
import { UserNameForm } from "@/components/forms/user-name-form";
import { NotificationAlert } from "@/components/notifications/NotificationAlert";
import { authOptions } from "@/lib/auth"
import { getCurrentUser } from "@/lib/session"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
import { LanguageForm2 } from "@/components/forms/language-form2"
import { UserNameForm } from "@/components/forms/user-name-form"
import { NotificationAlert } from "@/components/notifications/NotificationAlert"

export const metadata = {
title: "Dingify Notifications - Customize Your Alerts",
description:
"Adjust your Dingify notification settings for a personalized real-time monitoring experience. Manage alert preferences, notification channels, and more.",
};
}

export default async function SettingsPage() {
const user = await getCurrentUser();
const user = await getCurrentUser()

if (!user) {
redirect(authOptions.pages?.signIn || "/login");
redirect(authOptions.pages?.signIn || "/login")
}
// How to get the metrics for the user
const metrics = await getMetricsForUser();
const settings = await getNotificationSettings();
const metrics = await getMetricsForUser()
const settings = await getNotificationSettings()

return (
<DashboardShell>
Expand All @@ -43,5 +42,5 @@ export default async function SettingsPage() {
/>
<NotificationAlert initialSettings={settings} />
</DashboardShell>
);
)
}
4 changes: 2 additions & 2 deletions apps/www/src/app/(marketing)/open/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Skeleton } from "@dingify/ui/components/skeleton";
import { Skeleton } from "@propdock/ui/components/skeleton"

export default function Loading() {
return (
Expand All @@ -24,5 +24,5 @@ export default function Loading() {

<hr className="container" />
</div>
);
)
}
4 changes: 2 additions & 2 deletions apps/www/src/app/(marketing)/pricing/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Skeleton } from "@dingify/ui/components/skeleton";
import { Skeleton } from "@propdock/ui/components/skeleton"

export default function Loading() {
return (
Expand All @@ -24,5 +24,5 @@ export default function Loading() {

<hr className="container" />
</div>
);
)
}
20 changes: 10 additions & 10 deletions apps/www/src/app/(marketing)/pricing/page.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { PricingCards } from "@/components/pricing-cards";
import { PricingFaq } from "@/components/pricing-faq";
import { getCurrentUser } from "@/lib/session";
import { getUserSubscriptionPlan } from "@/lib/subscription";
import { Skeleton } from "@propdock/ui/components/skeleton"

import { Skeleton } from "@dingify/ui/components/skeleton";
import { getCurrentUser } from "@/lib/session"
import { getUserSubscriptionPlan } from "@/lib/subscription"
import { PricingCards } from "@/components/pricing-cards"
import { PricingFaq } from "@/components/pricing-faq"

export const metadata = {
title: "Dingify Pricing - Tailored Plans for Your Monitoring Needs",
description:
"Explore competitive pricing plans for Dingify. Find the perfect package to enhance your real-time monitoring, event tracking, and data analytics.",
};
}

export default async function PricingPage() {
const user = await getCurrentUser();
let subscriptionPlan;
const user = await getCurrentUser()
let subscriptionPlan

if (user) {
subscriptionPlan = await getUserSubscriptionPlan(user.id);
subscriptionPlan = await getUserSubscriptionPlan(user.id)
}

return (
Expand All @@ -25,5 +25,5 @@ export default async function PricingPage() {
<hr className="container" />
<PricingFaq />
</div>
);
)
}
5 changes: 2 additions & 3 deletions apps/www/src/app/(property)/property/[id]/building/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import Link from "next/link"
import { getPropertyDetails } from "@/actions/get-property-details"

import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@dingify/ui/components/card"
} from "@propdock/ui/components/card"

import { AddBuildingSheet } from "@/components/buttons/AddBuildingSheet"
import { DashboardHeader } from "@/components/dashboard/header"
Expand Down Expand Up @@ -65,7 +64,7 @@ export default async function PropertyPage({
<AddBuildingSheet propertyId={propertyId} />
</EmptyPlaceholder>
) : (
<div className="grid md:grid-cols-2 xl:grid-cols-4 gap-8">
<div className="grid gap-8 md:grid-cols-2 xl:grid-cols-4">
{propertyDetails.buildings.map((building) => (
<Card key={building.id}>
<CardHeader className="mb-5 bg-gradient-to-b from-muted/50 to-muted/10">
Expand Down
5 changes: 2 additions & 3 deletions apps/www/src/app/(property)/property/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import Link from "next/link"
import { getPropertyDetails } from "@/actions/get-property-details"

import { Badge } from "@dingify/ui/components/badge"
import { Badge } from "@propdock/ui/components/badge"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@dingify/ui/components/card"
} from "@propdock/ui/components/card"

import { AddBuildingSheet } from "@/components/buttons/AddBuildingSheet"
import { DashboardHeader } from "@/components/dashboard/header"
Expand Down
Loading

0 comments on commit e669dcc

Please sign in to comment.