-
Notifications
You must be signed in to change notification settings - Fork 2
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
Draft #88
Conversation
…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)
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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
Superseded by #89 |
No description provided.