Skip to content

Commit

Permalink
shrug
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguyinabeanie committed Nov 8, 2024
1 parent def6cfc commit 6f9d5d2
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 86 deletions.
18 changes: 9 additions & 9 deletions apps/nextjs/src/components/cookies/cookies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect, useState } from "react";
import Link from "next/link";
import Cookies from "js-cookie";

import { Button } from "@battle-stadium/ui/button";
import { Button } from "@battle-stadium/ui";

const cookieAttributes = (
attrs: Partial<Cookies.CookieAttributes>,
Expand All @@ -22,14 +22,14 @@ interface CookiesComponentProps {
isSignedIn: boolean;
userId: string | null | undefined;
}
export default function CookiesComponent({
export default function CookiesComponent ({
isSignedIn,
userId,
}: Readonly<CookiesComponentProps>) {
const cookieConsent = Cookies.get(COOKIE_CONSENT);
const [showConsent, setShowConsent] = useState(false);

function handleAccept() {
function handleAccept () {
Cookies.set(COOKIE_CONSENT, "accepted", cookieAttributes({ expires: 365 }));

if (isSignedIn && userId) {
Expand All @@ -39,7 +39,7 @@ export default function CookiesComponent({
setShowConsent(false);
}

function handleReject() {
function handleReject () {
Cookies.set(COOKIE_CONSENT, "rejected", cookieAttributes({ expires: 1 }));
setShowConsent(false);
}
Expand All @@ -62,7 +62,7 @@ export default function CookiesComponent({
}
}, [isSignedIn, cookieConsent, userId]);

async function callApiToSetUserId(userId: string) {
async function callApiToSetUserId (userId: string) {
try {
await fetch("/api/cookies/user-id", {
method: "POST",
Expand Down Expand Up @@ -96,12 +96,12 @@ export default function CookiesComponent({
<Button
className="px-4 font-medium"
// radius="lg"
style={{
style={ {
border: "solid 2px transparent",
backgroundOrigin: "border-box",
backgroundClip: "padding-box, border-box",
}}
onClick={handleAccept}
} }
onClick={ handleAccept }
>
Accept All
</Button>
Expand All @@ -110,7 +110,7 @@ export default function CookiesComponent({
className="font-medium"
// radius="lg"
// variant="light"
onClick={handleReject}
onClick={ handleReject }
>
Reject
</Button>
Expand Down
24 changes: 12 additions & 12 deletions apps/nextjs/src/components/navbar/navbar-mobile-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import Link from "next/link";
import { usePathname } from "next/navigation";
import { Menu } from "lucide-react";

import { Button } from "@battle-stadium/ui/button";
import { Sheet, SheetContent, SheetTrigger } from "@battle-stadium/ui/sheet";
import { Button, Sheet, SheetContent, SheetTrigger } from "@battle-stadium/ui";


import { NavbarItemsConfigs } from "~/lib/config/site";
import { cn } from "~/lib/utils";

export default function MobileMenu() {
export default function MobileMenu () {
const pathname = usePathname();
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
return (
<div className="md:hidden">
<Sheet open={isMobileMenuOpen} onOpenChange={setIsMobileMenuOpen}>
<Sheet open={ isMobileMenuOpen } onOpenChange={ setIsMobileMenuOpen }>
<SheetTrigger asChild>
<Button variant="ghost" size="icon">
<Menu className="h-6 w-6" />
Expand All @@ -25,21 +25,21 @@ export default function MobileMenu() {

<SheetContent side="right" className="w-[240px] sm:w-[300px]">
<div className="mt-6 flex flex-col space-y-4">
{NavbarItemsConfigs.map(({ label, value }) => (
{ NavbarItemsConfigs.map(({ label, value }) => (
<Link
key={value}
href={`/${value}`}
onClick={() => setIsMobileMenuOpen(false)}
className={cn(
key={ value }
href={ `/${value}` }
onClick={ () => setIsMobileMenuOpen(false) }
className={ cn(
"rounded-md px-3 py-2 text-sm font-medium transition-colors",
pathname === `/${value}`
? "bg-primary/10 text-primary"
: "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
)}
) }
>
{label}
{ label }
</Link>
))}
)) }
</div>
</SheetContent>
</Sheet>
Expand Down
12 changes: 6 additions & 6 deletions apps/nextjs/src/components/navbar/navbar-right-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { auth } from "@clerk/nextjs/server";
import { Icon } from "@iconify/react/dist/iconify.js";

import { Badge } from "@battle-stadium/ui/badge";
import { Button } from "@battle-stadium/ui/button";
import { Button } from "@battle-stadium/ui";
import {
Popover,
PopoverContent,
Expand All @@ -14,7 +14,7 @@ import {
import { getAccountMe } from "~/app/server-actions/accounts/actions";
import UserMenu from "./user-menu/user-menu";

export default async function RightMenu() {
export default async function RightMenu () {
const clerkAuth = await auth();
const me = (await getAccountMe())?.data;

Expand All @@ -24,7 +24,7 @@ export default async function RightMenu() {
<Icon
className="text-default-500"
icon="solar:magnifer-linear"
width={22}
width={ 22 }
/>
</Button>

Expand All @@ -33,7 +33,7 @@ export default async function RightMenu() {
<Icon
className="text-default-500"
icon="solar:settings-linear"
width={24}
width={ 24 }
/>
</Button>

Expand All @@ -43,7 +43,7 @@ export default async function RightMenu() {
<Icon
className="text-default-500"
icon="solar:bell-linear"
width={22}
width={ 22 }
/>
</Badge>
</PopoverTrigger>
Expand All @@ -54,7 +54,7 @@ export default async function RightMenu() {
</PopoverContent>
</Popover>

<UserMenu isSignedIn={!!clerkAuth.sessionId} me={me} />
<UserMenu isSignedIn={ !!clerkAuth.sessionId } me={ me } />
</Link>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { ColumnDef } from "@tanstack/react-table";
import * as React from "react";
import { ArrowUpDown, MoreHorizontal } from "lucide-react";

import { Button } from "@battle-stadium/ui/button";
import { Button } from "@battle-stadium/ui";
import { Checkbox } from "@battle-stadium/ui/checkbox";
import {
DropdownMenu,
Expand All @@ -26,14 +26,14 @@ export const columns: ColumnDef<Payment>[] = [
table.getIsAllPageRowsSelected() ||
(table.getIsSomePageRowsSelected() && "indeterminate")
}
onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
onCheckedChange={ (value) => table.toggleAllPageRowsSelected(!!value) }
aria-label="Select all"
/>
),
cell: ({ row }) => (
<Checkbox
checked={row.getIsSelected()}
onCheckedChange={(value) => row.toggleSelected(!!value)}
checked={ row.getIsSelected() }
onCheckedChange={ (value) => row.toggleSelected(!!value) }
aria-label="Select row"
/>
),
Expand All @@ -44,7 +44,7 @@ export const columns: ColumnDef<Payment>[] = [
accessorKey: "status",
header: "Status",
cell: ({ row }) => (
<div className="capitalize">{row.getValue("status")}</div>
<div className="capitalize">{ row.getValue("status") }</div>
),
},
{
Expand All @@ -53,14 +53,14 @@ export const columns: ColumnDef<Payment>[] = [
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === "asc")}
onClick={ () => column.toggleSorting(column.getIsSorted() === "asc") }
>
Email
<ArrowUpDown />
</Button>
);
},
cell: ({ row }) => <div className="lowercase">{row.getValue("email")}</div>,
cell: ({ row }) => <div className="lowercase">{ row.getValue("email") }</div>,
},
{
accessorKey: "amount",
Expand All @@ -74,7 +74,7 @@ export const columns: ColumnDef<Payment>[] = [
currency: "USD",
}).format(amount);

return <div className="text-right font-medium">{formatted}</div>;
return <div className="text-right font-medium">{ formatted }</div>;
},
},
{
Expand All @@ -94,7 +94,7 @@ export const columns: ColumnDef<Payment>[] = [
<DropdownMenuContent align="end">
<DropdownMenuLabel>Actions</DropdownMenuLabel>
<DropdownMenuItem
onClick={() => navigator.clipboard.writeText(payment.id)}
onClick={ () => navigator.clipboard.writeText(payment.id) }
>
Copy payment ID
</DropdownMenuItem>
Expand Down
Loading

0 comments on commit 6f9d5d2

Please sign in to comment.