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

Draft #88

Closed
wants to merge 3 commits into from
Closed

Draft #88

wants to merge 3 commits into from

Conversation

daaniissh
Copy link
Contributor

No description provided.

…iles

- Modified admin blog-related pages and components (admin/blog/page.tsx, admin-blog-form.tsx)
- Added new admin blog draft button component (admin-blog-draft-button.tsx)
- Added and updated database schema and migration files (schema.ts, migrations)
- Updated package dependencies (package.json, package-lock.json)
- Adjusted Zod schema in admin validation (admin.ts)
- Created a new icon component for tick (tick.tsx)
- Refactored and improved blog API and routes (blog/route.ts)
Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
moonlitgrace.space ⬜️ Ignored (Inspect) Visit Preview Sep 18, 2024 10:57am

Copy link
Owner

Choose a reason for hiding this comment

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

can we revert this change? old approach looks better

@@ -33,6 +33,7 @@
"class-variance-authority": "^0.7.0",
"cloudinary": "^2.4.0",
"clsx": "^2.1.1",
"copy-to-clipboard": "^3.3.3",
Copy link
Owner

Choose a reason for hiding this comment

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

is this necessary?

@@ -43,6 +44,7 @@
"next": "^14.2.11",
"postgres": "^3.4.4",
"react": "^18",
"react-copy-to-clipboard": "^5.1.0",
Copy link
Owner

Choose a reason for hiding this comment

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

...?


export const posts = pgTable('posts', {
id: serial('id').primaryKey(),
title: text('title').notNull(),
slug: text('slug').notNull(),
tag: text('tag').notNull(),
cover: text('cover'),
is_draft: boolean('is_draft').default(false),
Copy link
Owner

Choose a reason for hiding this comment

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

make the key to camelCase? like isDraft

// coverImage returns invalid File object if nothing is selected
if (validateFile(coverImage)) {
const coverImage = formData.get('cover') as File;
if (coverImage && validateFile(coverImage)) {
Copy link
Owner

Choose a reason for hiding this comment

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

coverImage && this is unnecessary since validateFile already checks this

@moonlitgrace
Copy link
Owner

Superseded by #89

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