Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update timezone handling & font #56

Merged
merged 2 commits into from
Jan 10, 2025
Merged
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: 2 additions & 2 deletions app/(api)/api/calendar/[ownerId]/[projectId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export async function GET(
end: timezone
? task.dueDate.toLocaleString("en-US", { timeZone: timezone })
: task.dueDate,
summary: `[${tasklist.name}] ${task.name}`,
description: task.description,
summary: `[${tasklist.name}] ${task.name}`,
description: `${task.description}`,
allDay: true,
created: task.createdAt,
lastModified: task.updatedAt,
Expand Down
7 changes: 6 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { ThemeProvider } from "@/components/core/theme-provider";
import { SITE_METADATA } from "@/data/marketing";
import { cn } from "@/lib/utils";
import { Archivo } from "next/font/google";

import "./globals.css";

const archivo = Archivo({
subsets: ["latin"],
});

export const metadata = {
title: SITE_METADATA.TITLE,
description: SITE_METADATA.DESCRIPTION,
Expand All @@ -17,7 +22,7 @@ export default function RootLayout({
return (
<html
lang="en"
className={cn("dark flex min-h-full min-w-full")}
className={cn("dark flex min-h-full min-w-full", archivo.className)}
suppressHydrationWarning
>
<head>
Expand Down
3 changes: 2 additions & 1 deletion components/form/event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { Input } from "@/components/ui/input";
import type { EventWithInvites, User } from "@/drizzle/types";
import dayjs from "dayjs";
import { Trash2Icon } from "lucide-react";
import { useState } from "react";
import { RRule, rrulestr } from "rrule";
Expand Down Expand Up @@ -34,7 +35,7 @@ export default function EventForm({

const start = item?.start
? new Date(item.start)
: new Date(new Date().setHours(new Date().getHours() + 1));
: dayjs(new Date()).add(2, "hours").startOf("hour").toDate();

const end = item?.end ? new Date(item.end) : undefined;

Expand Down
1 change: 0 additions & 1 deletion components/project/events/events-calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Calendar } from "@/components/ui/calendar";
import type { EventWithInvites } from "@/drizzle/types";
import dayjs from "dayjs";
import { useRouter } from "next/navigation";
import { DateTimePicker } from "./date-time-picker";
import EventsList from "./events-list";

export default function EventsCalendar({
Expand Down
2 changes: 1 addition & 1 deletion components/project/events/events-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function EventsList({
compact?: boolean;
}) {
const filteredEvents = events.filter((x) =>
filterByRepeatRule(x, dayjs(date).toDate()),
filterByRepeatRule(x, new Date(date)),
);

return (
Expand Down
17 changes: 0 additions & 17 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,6 @@ module.exports = {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
fontFamily: {
sans: [
"system-ui",
"-apple-system",
"BlinkMacSystemFont",
'"Segoe UI"',
"Roboto",
'"Helvetica Neue"',
"Arial",
'"Noto Sans"',
"sans-serif",
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Noto Color Emoji"',
],
},
},
},
plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography")],
Expand Down
Loading