diff --git a/src/app/(main)/blocked_slots/[slotId]/page.tsx b/src/app/(main)/blocker/[slotId]/page.tsx similarity index 100% rename from src/app/(main)/blocked_slots/[slotId]/page.tsx rename to src/app/(main)/blocker/[slotId]/page.tsx diff --git a/src/app/(main)/blocked_slots/new/page.tsx b/src/app/(main)/blocker/new/page.tsx similarity index 100% rename from src/app/(main)/blocked_slots/new/page.tsx rename to src/app/(main)/blocker/new/page.tsx diff --git a/src/app/(main)/blocked_slots/page.tsx b/src/app/(main)/blocker/page.tsx similarity index 90% rename from src/app/(main)/blocked_slots/page.tsx rename to src/app/(main)/blocker/page.tsx index 2331737..1acf660 100644 --- a/src/app/(main)/blocked_slots/page.tsx +++ b/src/app/(main)/blocker/page.tsx @@ -22,7 +22,7 @@ export default function BlockedSlots() {
{/* Heading */}

- My Blocked Slots + My Blockers

{/* Scrollable blocked slot list */} @@ -40,11 +40,11 @@ export default function BlockedSlots() { ) : (
diff --git a/src/components/calendar.tsx b/src/components/calendar.tsx index 56885e0..d77b00a 100644 --- a/src/components/calendar.tsx +++ b/src/components/calendar.tsx @@ -234,7 +234,7 @@ function CalendarWithUserEvents({ onSelectEvent={(event) => { if (event.type === 'blocked_private') return; if (event.type === 'blocked_owned') { - router.push(`/blocked_slots/${event.id}`); + router.push(`/blocker/${event.id}`); return; } if (event.type === 'event') { diff --git a/src/components/custom-ui/app-sidebar.tsx b/src/components/custom-ui/app-sidebar.tsx index 50e88c2..721adf7 100644 --- a/src/components/custom-ui/app-sidebar.tsx +++ b/src/components/custom-ui/app-sidebar.tsx @@ -14,7 +14,7 @@ import { SidebarMenuItem, } from '@/components/custom-ui/sidebar'; -import { ChevronDown } from 'lucide-react'; +import { CalendarMinus, CalendarMinus2, ChevronDown } from 'lucide-react'; import { Collapsible, CollapsibleContent, @@ -28,8 +28,8 @@ import Link from 'next/link'; import { Star, CalendarDays, - User, - Users, + //User, + //Users, CalendarClock, CalendarPlus, } from 'lucide-react'; @@ -40,7 +40,7 @@ const items = [ url: '/home', icon: CalendarDays, }, - { + /*{ title: 'Friends', url: '#', icon: User, @@ -49,12 +49,17 @@ const items = [ title: 'Groups', url: '#', icon: Users, - }, + },*/ { title: 'Events', url: '/events', icon: CalendarClock, }, + { + title: 'Blockers', + url: '/blocker', + icon: CalendarMinus, + }, ]; export function AppSidebar() { @@ -123,6 +128,17 @@ export function AppSidebar() { + + + + + New Blocker + + + diff --git a/src/components/custom-ui/blocked-slot-list-entry.tsx b/src/components/custom-ui/blocked-slot-list-entry.tsx index 4690eea..9d1acdf 100644 --- a/src/components/custom-ui/blocked-slot-list-entry.tsx +++ b/src/components/custom-ui/blocked-slot-list-entry.tsx @@ -22,7 +22,7 @@ export default function BlockedSlotListEntry(slot: BlockedSlotListEntryProps) { }); }; return ( - +
diff --git a/src/components/forms/blocked-slot-form.tsx b/src/components/forms/blocked-slot-form.tsx index c6ed109..1293e58 100644 --- a/src/components/forms/blocked-slot-form.tsx +++ b/src/components/forms/blocked-slot-form.tsx @@ -71,7 +71,7 @@ export default function BlockedSlotForm({ const { mutateAsync: deleteBlockedSlot } = useDeleteApiBlockedSlotsSlotID({ mutation: { onSuccess: () => { - router.push('/blocked_slots'); + router.push('/blocker'); }, }, }); @@ -80,7 +80,7 @@ export default function BlockedSlotForm({ mutation: { onSuccess: () => { resetCreate(); - router.push('/blocked_slots'); + router.push('/blocker'); }, }, }); @@ -155,9 +155,7 @@ export default function BlockedSlotForm({

- {existingBlockedSlotId - ? 'Update Blocked Slot' - : 'Create Blocked Slot'} + {existingBlockedSlotId ? 'Update Blocker' : 'Create Blocker'}

@@ -216,9 +214,7 @@ export default function BlockedSlotForm({ formStateCreate.isSubmitting || formStateUpdate.isSubmitting } > - {existingBlockedSlotId - ? 'Update Blocked Slot' - : 'Create Blocked Slot'} + {existingBlockedSlotId ? 'Update Blocker' : 'Create Blocker'} {existingBlockedSlotId && ( )}
diff --git a/src/components/forms/event-form.tsx b/src/components/forms/event-form.tsx index d4fb216..11bf820 100644 --- a/src/components/forms/event-form.tsx +++ b/src/components/forms/event-form.tsx @@ -175,7 +175,6 @@ const EventForm: React.FC = (props) => { console.log('Creating event'); const mutationResult = await createEvent({ data }); eventID = mutationResult.data.event.id; - createEvent({ data }); } toast.custom((t) => (