Skip to content

Commit

Permalink
fix: typecheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed Dec 8, 2024
1 parent 84006f2 commit 04ab029
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
4 changes: 3 additions & 1 deletion apps/docs/content/components/date-input/granularity.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import {DateInput} from "@nextui-org/react";
import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date";

export default function App() {
let [date, setDate] = React.useState<DateValue | null>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="w-full max-w-xl flex flex-col items-start gap-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import {DateValue, parseAbsoluteToLocal} from "@internationalized/date";
import {I18nProvider} from "@react-aria/i18n";

export default function App() {
const [date, setDate] = React.useState<DateValue | null>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
const [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="flex flex-col gap-4">
Expand Down
4 changes: 3 additions & 1 deletion apps/docs/content/components/date-picker/granularity.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import {DatePicker} from "@nextui-org/react";
import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date";

export default function App() {
let [date, setDate] = React.useState<DateValue | null>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="w-full max-w-xl flex flex-col items-start gap-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import {DateValue, parseAbsoluteToLocal} from "@internationalized/date";
import {I18nProvider} from "@react-aria/i18n";

export default function App() {
let [date, setDate] = React.useState<DateValue | null>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="flex flex-col gap-4">
Expand Down
8 changes: 6 additions & 2 deletions packages/components/date-input/stories/date-input.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ const TimeZonesTemplate = (args: DateInputProps) => (
);

const GranularityTemplate = (args: DateInputProps) => {
let [date, setDate] = React.useState<DateValue | null>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="w-full max-w-xl flex flex-col items-start gap-4">
Expand All @@ -155,7 +157,9 @@ const GranularityTemplate = (args: DateInputProps) => {
};

const InternationalCalendarsTemplate = (args: DateInputProps) => {
let [date, setDate] = React.useState<DateValue | null>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="flex flex-col gap-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ const TimeZonesTemplate = (args: DatePickerProps) => (
);

const GranularityTemplate = (args: DatePickerProps) => {
let [date, setDate] = React.useState<DateValue | null>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="w-full max-w-xl flex flex-col items-start gap-4">
Expand Down Expand Up @@ -182,7 +184,9 @@ const GranularityTemplate = (args: DatePickerProps) => {
};

const InternationalCalendarsTemplate = (args: DatePickerProps) => {
let [date, setDate] = React.useState<DateValue | null>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="flex flex-col gap-4">
Expand Down

0 comments on commit 04ab029

Please sign in to comment.