Compare commits
1 commit
e0d57329c9
...
746a243dc3
Author | SHA1 | Date | |
---|---|---|---|
746a243dc3 |
3 changed files with 4 additions and 20 deletions
|
@ -8,10 +8,7 @@ export default function Home() {
|
|||
|
||||
return (
|
||||
<div className='max-h-full'>
|
||||
<Calendar
|
||||
userId={data?.data.user?.id}
|
||||
height='calc(100svh - 50px - (var(--spacing) * 2 * 5))'
|
||||
/>
|
||||
<Calendar userId={data?.data.user?.id} height='calc(100svh - 50px - (var(--spacing) * 2 * 5))' />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -219,8 +219,7 @@ export const GET = auth(async function GET(req, { params }) {
|
|||
success: true,
|
||||
calendar: calendar.filter(
|
||||
(event, index, self) =>
|
||||
self.findIndex((e) => e.id === event.id && e.type === event.type) ===
|
||||
index,
|
||||
self.findIndex((e) => e.id === event.id && e.type === event.type) === index,
|
||||
),
|
||||
});
|
||||
});
|
||||
|
|
|
@ -41,13 +41,7 @@ const DaDRBCalendar = withDragAndDrop<
|
|||
|
||||
const localizer = momentLocalizer(moment);
|
||||
|
||||
export default function Calendar({
|
||||
userId,
|
||||
height,
|
||||
}: {
|
||||
userId?: string;
|
||||
height: string;
|
||||
}) {
|
||||
export default function Calendar({ userId, height }: { userId?: string; height: string }) {
|
||||
return (
|
||||
<QueryErrorResetBoundary>
|
||||
{({ reset }) => (
|
||||
|
@ -78,13 +72,7 @@ export default function Calendar({
|
|||
);
|
||||
}
|
||||
|
||||
function CalendarWithUserEvents({
|
||||
userId,
|
||||
height,
|
||||
}: {
|
||||
userId: string;
|
||||
height: string;
|
||||
}) {
|
||||
function CalendarWithUserEvents({ userId, height }: { userId: string; height: string }) {
|
||||
const sesstion = useSession();
|
||||
const [currentView, setCurrentView] = React.useState<
|
||||
'month' | 'week' | 'day' | 'agenda' | 'work_week'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue