Skip to content

Commit

Permalink
fix: build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dyzhuu committed Oct 20, 2024
1 parent 94ceefb commit db8aad4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 28 deletions.
1 change: 0 additions & 1 deletion src/app/(dev)/account/client-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { z } from "zod";
import { BackNavigationBar } from "@/components/BackNavigationBar";
import { TextInput } from "@/components/TextInput";
import { Button } from "@/components/ui/button";
// import { useRouter } from "next/router";
import { cn } from "@/lib/utils";
import type { PlayLevel } from "@/types/types";

Expand Down
7 changes: 5 additions & 2 deletions src/app/admin/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CalendarClock, CalendarDays } from "lucide-react";
import { CalendarClock, CalendarDays, Users } from "lucide-react";
import { BsPersonFillCheck } from "react-icons/bs";

import { DashboardButton } from "@/components/admin/DashboardButton";
Expand All @@ -25,8 +25,11 @@ export default async function AdminDashboardPage() {
Edit Semester Schedules
</DashboardButton>
<DashboardButton href="/admin/members" className="relative">
<Users size={24} className="min-w-6" /> Manage Members
</DashboardButton>
<DashboardButton href="/admin/member-approval" className="relative">
<MemberApprovalPing />
<BsPersonFillCheck size={24} className="min-w-6" /> Members
<BsPersonFillCheck size={24} className="min-w-6" /> Approve Members
</DashboardButton>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { useMemo, useState } from "react";
import { useMemo } from "react";
import {
getCoreRowModel,
getPaginationRowModel,
Expand Down Expand Up @@ -58,10 +58,10 @@ export function MemberManagementTable({ className }: { className?: string }) {
<TableRow>
<TableHead className="w-[200px]">Name</TableHead>
<TableHead className="lg:table-cell">Email</TableHead>
<TableHead className="w-[200px] lg:table-cell text-center">
<TableHead className="w-[200px] text-center lg:table-cell">
Prepaid Sessions
</TableHead>
<TableHead className="w-[200px] lg:table-cell text-center">
<TableHead className="w-[200px] text-center lg:table-cell">
Actions
</TableHead>
</TableRow>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
"use client";

import React from "react";
import { zodResolver } from "@hookform/resolvers/zod";
import type { Row } from "@tanstack/react-table";
import { Ellipsis } from "lucide-react";
import { useForm } from "react-hook-form";
import { z } from "zod";

import { Button } from "@/components/ui/button";
import { TableCell, TableRow } from "@/components/ui/table";
import type { Member } from "./columns";
Expand All @@ -15,25 +11,9 @@ interface MemberManagementTableRowProps {
userId: string;
}

const formSchema = z.object({
prepaidSessions: z
.string()
.min(1, "Field is required")
.pipe(z.coerce.number().positive()),
});

export function MemberManagementTableRow({
row,
userId,
}: MemberManagementTableRowProps) {
const {
register,
handleSubmit,
formState: { errors, touchedFields },
} = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
});

const name: string = row.getValue("name");
const email: string = row.getValue("email");
const prepaidSessions: string = row.getValue("prepaidSessions");
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./MemberManagementlTable";
export * from "./MemberManagementTable";

0 comments on commit db8aad4

Please sign in to comment.