Skip to content

Cleanup#61

Merged
Priyansh4444 merged 8 commits intomasterfrom
cleanup
Jan 12, 2026
Merged

Cleanup#61
Priyansh4444 merged 8 commits intomasterfrom
cleanup

Conversation

@rebecca-123
Copy link
Copy Markdown
Collaborator

No description provided.

@rebecca-123 rebecca-123 marked this pull request as ready for review January 11, 2026 06:29
);
} catch (error) {
console.log(error);
console.log("Failed to send verification code.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this there is console.error and also i was wondering if you could just try adding a posthog thing instead a log is no longer useful :(

} else {
statusLabel = "Found";
}
const dateLabel = item.date || item.itemDate || "Unknown date";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confused at the difference of itemDate and item.date, a comment would be helpful in the DB 😔

Comment thread src/lib/utils.ts Outdated
Comment on lines +27 to +31
export function formatDate(dateString: string) {
const yearMonthDateSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/);
let date;
if (dateString) {
if (yearMonthDateSchema.safeParse(dateString).success) {
Copy link
Copy Markdown
Member

@Priyansh4444 Priyansh4444 Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function definition should Option<dateString> or dateString|undefined if it requires and if check to be validated

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed null checks since original checks in code were actually not needed based on schema's non-null constraints.

@Priyansh4444 Priyansh4444 merged commit 649c9c7 into master Jan 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants