Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/web/knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignore": ["src/components/ui/**"]
}
37 changes: 6 additions & 31 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,17 @@
"lint": "next lint",
"test": "jest",
"test:watch": "jest --watch",
"postinstall": "prisma generate"
"postinstall": "prisma generate",
"knip": "knip"
},
"engines": {
"node": "20.x"
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@headlessui/react": "^1.7.17",
"@hookform/resolvers": "^5.0.1",
"@nextui-org/react": "^2.1.13",
"@prisma/client": "^5.14.0",
"@radix-ui/react-avatar": "^1.1.6",
"@radix-ui/react-checkbox": "^1.2.3",
"@radix-ui/react-collapsible": "^1.1.8",
"@radix-ui/react-dialog": "^1.1.11",
"@radix-ui/react-dropdown-menu": "^2.1.11",
Expand All @@ -34,21 +29,12 @@
"@radix-ui/react-select": "^2.2.2",
"@radix-ui/react-separator": "^1.1.4",
"@radix-ui/react-slot": "^1.2.0",
"@radix-ui/react-switch": "^1.2.2",
"@radix-ui/react-tabs": "^1.1.8",
"@radix-ui/react-toggle": "^1.1.6",
"@radix-ui/react-toggle-group": "^1.1.7",
"@radix-ui/react-tooltip": "^1.2.4",
"@react-google-maps/api": "^2.19.2",
"@react-pdf/renderer": "^3.1.14",
"@sendgrid/mail": "^8.1.5",
"@stripe/react-stripe-js": "^2.4.0",
"@stripe/stripe-js": "^2.2.0",
"@tanstack/react-query": "^5.8.4",
"@tanstack/react-table": "^8.21.3",
"@types/node": "20.6.0",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"@vercel/analytics": "^1.1.1",
"@vercel/node": "^5.1.14",
"@vercel/toolbar": "^0.1.34",
Expand All @@ -67,48 +53,37 @@
"eslint": "8.49.0",
"firebase": "^11.6.0",
"firebase-admin": "^13.3.0",
"firebase-tools": "^13.11.2",
"flags": "^3.1.1",
"framer-motion": "^10.16.4",
"google-map-react": "^2.2.1",
"js-cookie": "^3.0.5",
"jsonwebtoken": "^8.5.1",
"jspdf": "^2.5.1",
"lucide-react": "^0.503.0",
"micro": "^10.0.1",
"next": "^14.2.23",
"next-themes": "^0.4.6",
"postcss": "8.4.29",
"react": "18",
"react-chartjs-2": "^5.2.0",
"react-csv": "^2.2.2",
"react-day-picker": "8.10.1",
"react-dom": "18",
"react-error-boundary": "^4.0.11",
"react-google-autocomplete": "^2.7.3",
"react-google-maps": "^9.4.5",
"react-hook-form": "^7.55.0",
"react-icons": "^4.11.0",
"react-pdf": "^7.5.1",
"react-router-dom": "^6.17.0",
"recharts": "^2.15.3",
"short-unique-id": "^5.0.3",
"sonner": "^2.0.3",
"stripe": "^14.5.0",
"swr": "^2.2.2",
"tailwind-merge": "^3.2.0",
"tailwindcss": "3.3.3",
"tailwindcss-animate": "^1.0.7",
"troptix-api": "*",
"troptix-models": "*",
"typescript": "5.2.2",
"vaul": "^1.1.2",
"zod": "^3.24.3"
},
"devDependencies": {
"@testing-library/react": "^14.2.0",
"@types/jest": "^29.5.12",
"@types/node": "^22.15.3",
"eslint-config-next": "^14.2.23",
"prisma": "^5.14.0"
"knip": "^5.50.5",
"typescript": "^5.8.3",
"@types/react": "18.2.21"
}
}
10 changes: 5 additions & 5 deletions apps/web/src/app/organizer/events/[eventId]/_lib/getEventData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ import { OrderStatus, Prisma } from '@prisma/client';
import { notFound } from 'next/navigation';
import prisma from '@/server/prisma';

export type TicketTypeBreakdown = {
type TicketTypeBreakdown = {
name: string;
sold: number;
fill: string;
};

export type DailyPerformanceDataPoint = {
type DailyPerformanceDataPoint = {
date: string;
revenue: number;
};

export type AttendeeSample = {
type AttendeeSample = {
id: string;
name: string;
ticketType: string;
checkedIn: boolean; // Not supported yet, could use the ticket statusfield in tickets table
};

export type OrderSample = {
type OrderSample = {
id: string;
customerDisplay: string;
amount: number;
date: string;
status: OrderStatus;
};

export type EventOverviewData = {
type EventOverviewData = {
eventId: string;
eventName: string;
isDraft: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const priceFilterFn: FilterFn<TicketType> = (row, columnId, filterValue) => {
return true;
};

export const columns: ColumnDef<TicketType>[] = [
const columns: ColumnDef<TicketType>[] = [
{
accessorKey: 'name',
header: 'Name',
Expand Down
5 changes: 2 additions & 3 deletions apps/web/src/components/AdminLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Menu } from 'lucide-react';
import { Menu, ChevronDown } from 'lucide-react';
import Link from 'next/link';

import { TropTixContext } from '@/components/AuthProvider';
import AdminSidebar from '@/components/pages/admin/navigation/AdminSidebar';
import AdminSidebarMobile from '@/components/pages/admin/navigation/AdminSidebarMobile';
import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet';
import { DownOutlined } from '@ant-design/icons';
import { Button, Dropdown, MenuProps } from 'antd';
import { useContext } from 'react';
import Logo from './ui/logo';
Expand Down Expand Up @@ -77,7 +76,7 @@ export default function AdminLayout({
<Dropdown className="cursor-pointer" menu={{ items }}>
<a className="inline-flex items-center justify-center leading-snug transition duration-150 ease-in-out">
<div style={{ fontSize: '16px' }}>{user.email}</div>
<DownOutlined className="ml-1 text-xs" />
<ChevronDown />
</a>
</Dropdown>
</ul>
Expand Down
13 changes: 6 additions & 7 deletions apps/web/src/components/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import { User, initializeUser } from '@/hooks/types/User';
import { cn } from '@/lib/utils';
import { LoadingOutlined } from '@ant-design/icons';
import { Spin } from 'antd';
import { onIdTokenChanged } from 'firebase/auth';

import { Inter } from 'next/font/google';
Expand All @@ -12,7 +10,7 @@ import { createContext, useContext, useEffect, useState } from 'react';
import { auth } from '../config';
import Cookies from 'js-cookie';
import { useOrganizerStatus } from '@/hooks/useUser';

import LoadingIndicator from '@/components/ui/loading-indicator';
const inter = Inter({
subsets: ['latin'],
variable: '--font-inter',
Expand All @@ -29,7 +27,7 @@ export const TropTixContext = createContext({
loading: true,
});

export const useTropTixContext = () => useContext(TropTixContext);
const useTropTixContext = () => useContext(TropTixContext);

export default function AuthProvider({
children,
Expand Down Expand Up @@ -93,9 +91,10 @@ export default function AuthProvider({
>
{loading && (pathname === '/' || pathname === '/home') ? (
<>
<Spin
className="flex h-screen items-center justify-center"
indicator={<LoadingOutlined style={{ fontSize: 84 }} spin />}
<LoadingIndicator
thickness="border-8"
size="w-20 h-20"
className="w-full h-screen"
/>
</>
) : (
Expand Down
31 changes: 0 additions & 31 deletions apps/web/src/components/TicketDetail.tsx

This file was deleted.

73 changes: 0 additions & 73 deletions apps/web/src/components/navbar.tsx

This file was deleted.

67 changes: 0 additions & 67 deletions apps/web/src/components/pages/admin/Sidebar.tsx

This file was deleted.

Loading