refactor: rename event folder to events
This commit is contained in:
parent
194e329468
commit
25b3ec6808
5 changed files with 4 additions and 4 deletions
|
@ -16,7 +16,7 @@ export default function ShowEvent() {
|
|||
const session = useSession();
|
||||
const pathname = usePathname();
|
||||
|
||||
// Extract eventId from URL like /event/[eventId]
|
||||
// Extract eventId from URL like /events/[eventId]
|
||||
const eventId = pathname.split('/').pop() || '';
|
||||
|
||||
// Fetch event data
|
||||
|
@ -158,7 +158,7 @@ export default function ShowEvent() {
|
|||
<div className='w-[20%] grid max-sm:w-full'>
|
||||
{session.data?.user?.id === event.organizer.id ? (
|
||||
<RedirectButton
|
||||
redirectUrl={`/event/edit/${eventId}`}
|
||||
redirectUrl={`/events/edit/${eventId}`}
|
||||
buttonText='edit'
|
||||
className='w-full'
|
||||
/>
|
|
@ -17,7 +17,7 @@ export default function Home() {
|
|||
</h1>
|
||||
<RedirectButton redirectUrl='/logout' buttonText='Logout' />
|
||||
<RedirectButton redirectUrl='/settings' buttonText='Settings' />
|
||||
<RedirectButton redirectUrl='/event/new' buttonText='New Event' />
|
||||
<RedirectButton redirectUrl='/events/new' buttonText='New Event' />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -151,7 +151,7 @@ const EventForm: React.FC<EventFormProps> = (props) => {
|
|||
toastId={t}
|
||||
title='Event saved'
|
||||
description={event?.title}
|
||||
onAction={() => router.push(`/event/${event?.id}`)}
|
||||
onAction={() => router.push(`/events/${event?.id}`)}
|
||||
variant='success'
|
||||
buttonText='show'
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue