Skip to content

Commit

Permalink
chore: format code with Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 8, 2024
1 parent 8d71342 commit 24757ca
Show file tree
Hide file tree
Showing 43 changed files with 955 additions and 912 deletions.
7 changes: 1 addition & 6 deletions apps/app/app/(routes)/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@

export default function Home() {
return (
<div>
Hii
</div>
);
return <div>Hii</div>;
}
20 changes: 10 additions & 10 deletions apps/app/app/(routes)/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"use client";
import Infobar from '@/components/custom/infobar/infobar'
import BillingSettings from '@/components/custom/settings/billing.settings';
import ThemeSettings from '@/components/custom/settings/theme.settings';
import React from 'react'
import Infobar from "@/components/custom/infobar/infobar";
import BillingSettings from "@/components/custom/settings/billing.settings";
import ThemeSettings from "@/components/custom/settings/theme.settings";
import React from "react";

export default function SettingsPage() {
return (
<div className='flex flex-col h-full w-full items-start overflow-hidden p-2'>
<div className="flex flex-col h-full w-full items-start overflow-hidden p-2">
<div>
<Infobar/>
<Infobar />
</div>
<div className='flex flex-col gap-10'>
<BillingSettings/>
<ThemeSettings/>
<div className="flex flex-col gap-10">
<BillingSettings />
<ThemeSettings />
</div>
</div>
)
);
}
20 changes: 9 additions & 11 deletions apps/app/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,18 @@ import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar";
import { AppSidebar } from "@/components/custom/sidebar/sidebar";
import { cookies } from "next/headers";


export const metadata: Metadata = {
title: "Plura",
description: "Generated by create next app",
};


async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const cookieStore = await cookies()
const defaultOpen = cookieStore.get("plura-sidebar:state")?.value === "true"
const cookieStore = await cookies();
const defaultOpen = cookieStore.get("plura-sidebar:state")?.value === "true";

return (
<html lang="en" suppressHydrationWarning>
Expand All @@ -32,17 +30,17 @@ async function RootLayout({
enableSystem
disableTransitionOnChange
>
<SidebarProvider defaultOpen={defaultOpen}>
<AppSidebar />
<div className="p-2">
{/* <SidebarTrigger/> */}
{children}
</div>
<SidebarProvider defaultOpen={defaultOpen}>
<AppSidebar />
<div className="p-2">
{/* <SidebarTrigger/> */}
{children}
</div>
</SidebarProvider>
</ThemeProvider>
</body>
</html>
);
}

export default RootLayout;
export default RootLayout;
52 changes: 26 additions & 26 deletions apps/app/components/custom/infobar/bread-crumb.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { usePathname } from 'next/navigation'
import React from 'react'
import { usePathname } from "next/navigation";
import React from "react";

export default function InfoBreadCrumb() {
const page = usePathname();
return (
<div className="flex flex-col ">
<div className="flex gap-5 items-center">
<h2 className="text-3xl font-bold capitalize">
{page.replace(/^\/+/, '')}
</h2>
{/* {page === 'conversation' && chatRoom && (
const page = usePathname();
return (
<div className="flex flex-col ">
<div className="flex gap-5 items-center">
<h2 className="text-3xl font-bold capitalize">
{page.replace(/^\/+/, "")}
</h2>
{/* {page === 'conversation' && chatRoom && (
<Loader
loading={loading}
className="p-0 inline"
Expand All @@ -21,20 +21,20 @@ export default function InfoBreadCrumb() {
/>
</Loader>
)} */}
</div>
<p className="text-muted-foreground text-sm">
{page == 'settings'
? 'Manage your account settings, preferences and integrations'
: page == 'dashboard'
? 'A detailed overview of your metrics, usage, customers and more'
: page == 'appointment'
? 'View and edit all your appointments'
: page == 'email-marketing'
? 'Send bulk emails to your customers'
: page == 'integration'
? 'Connect third-party applications into Corinna-AI'
: 'Modify domain settings, change chatbot options, enter sales questions and train your bot to do what you want it to.'}
</p>
</div>
)
</div>
<p className="text-muted-foreground text-sm">
{page == "settings"
? "Manage your account settings, preferences and integrations"
: page == "dashboard"
? "A detailed overview of your metrics, usage, customers and more"
: page == "appointment"
? "View and edit all your appointments"
: page == "email-marketing"
? "Send bulk emails to your customers"
: page == "integration"
? "Connect third-party applications into Corinna-AI"
: "Modify domain settings, change chatbot options, enter sales questions and train your bot to do what you want it to."}
</p>
</div>
);
}
22 changes: 11 additions & 11 deletions apps/app/components/custom/infobar/infobar.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react'
import InfoBreadCrumb from './bread-crumb'
import { SidebarTrigger } from '@/components/ui/sidebar'
import React from "react";
import InfoBreadCrumb from "./bread-crumb";
import { SidebarTrigger } from "@/components/ui/sidebar";

export default function Infobar() {
return (
<nav className="flex w-full items-start justify-between gap-4 mb-8">
<div className="flex items-center">
<SidebarTrigger />
</div>
<InfoBreadCrumb />
</nav>
)
return (
<nav className="flex w-full items-start justify-between gap-4 mb-8">
<div className="flex items-center">
<SidebarTrigger />
</div>
<InfoBreadCrumb />
</nav>
);
}
14 changes: 7 additions & 7 deletions apps/app/components/custom/section/section.label.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react'
import React from "react";

interface SectionProps {
label: string
msg: string
label: string;
msg: string;
}
export default function SectionLabel({label, msg}: SectionProps) {
export default function SectionLabel({ label, msg }: SectionProps) {
return (
<div>
<p className='text-lg font-medium mb-2'>{label}</p>
<p className='text-sm text-muted-foreground'>{msg}</p>
<p className="text-lg font-medium mb-2">{label}</p>
<p className="text-sm text-muted-foreground">{msg}</p>
</div>
)
);
}
15 changes: 9 additions & 6 deletions apps/app/components/custom/settings/billing.settings.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React from 'react'
import SectionLabel from '../section/section.label'
import React from "react";
import SectionLabel from "../section/section.label";

export default function BillingSettings() {
return (
<div className='grid grid-cols-1 lg:grid-cols-5 gap-10'>
<div className='lg:col-span-1'>
<SectionLabel label='Billing Settings' msg='Add payment information, upgrade or modify your plan.'/>
<div className="grid grid-cols-1 lg:grid-cols-5 gap-10">
<div className="lg:col-span-1">
<SectionLabel
label="Billing Settings"
msg="Add payment information, upgrade or modify your plan."
/>
</div>
</div>
)
);
}
58 changes: 32 additions & 26 deletions apps/app/components/custom/settings/theme.settings.tsx
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
'use client'
"use client";

import { useTheme } from 'next-themes'
import { Skeleton } from '@/components/ui/skeleton'
import { cn } from '@/lib/utils'
import SectionLabel from '../section/section.label'
import { SystemMode } from '@/components/icons/themes/system'
import { LightMode } from '@/components/icons/themes/light'
import { DarkMode } from '@/components/icons/themes/dark'
import BlurFade from '@/components/ui/blur-fade'
import { useTheme } from "next-themes";
import { Skeleton } from "@/components/ui/skeleton";
import { cn } from "@/lib/utils";
import SectionLabel from "../section/section.label";
import { SystemMode } from "@/components/icons/themes/system";
import { LightMode } from "@/components/icons/themes/light";
import { DarkMode } from "@/components/icons/themes/dark";
import BlurFade from "@/components/ui/blur-fade";

export default function Component() {
const { setTheme, theme } = useTheme()
const { setTheme, theme } = useTheme();

return (
<div className="grid grid-cols-1 lg:grid-cols-5 gap-10">
<div className="lg:col-span-1">
<SectionLabel label='Interface Settings' msg='Select or customize your interface theme.'/>
<SectionLabel
label="Interface Settings"
msg="Select or customize your interface theme."
/>
</div>
<BlurFade delay={0.25} className="lg:col-span-4 flex lg:flex-row flex-col items-center gap-5">
<BlurFade
delay={0.25}
className="lg:col-span-4 flex lg:flex-row flex-col items-center gap-5"
>
{theme ? (
<>
<div
className={cn(
'rounded-2xl overflow-hidden cursor-pointer border-4 border-transparent',
theme == 'system' && 'border-border'
"rounded-2xl overflow-hidden cursor-pointer border-4 border-transparent",
theme == "system" && "border-border",
)}
onClick={() => setTheme('system')}
onClick={() => setTheme("system")}
>
<SystemMode/>
<SystemMode />
</div>
<div
className={cn(
'rounded-2xl overflow-hidden cursor-pointer border-4 border-transparent',
theme == 'light' && 'border-border'
"rounded-2xl overflow-hidden cursor-pointer border-4 border-transparent",
theme == "light" && "border-border",
)}
onClick={() => setTheme('light')}
onClick={() => setTheme("light")}
>
<LightMode/>
<LightMode />
</div>
<div
className={cn(
'rounded-2xl overflow-hidden cursor-pointer border-4 border-transparent',
theme == 'dark' && 'border-border'
"rounded-2xl overflow-hidden cursor-pointer border-4 border-transparent",
theme == "dark" && "border-border",
)}
onClick={() => setTheme('dark')}
onClick={() => setTheme("dark")}
>
<DarkMode/>
<DarkMode />
</div>
</>
) : (
Expand All @@ -63,5 +69,5 @@ export default function Component() {
)}
</BlurFade>
</div>
)
}
);
}
Loading

0 comments on commit 24757ca

Please sign in to comment.