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

Staging #260

Merged
merged 2 commits into from
Aug 5, 2022
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
2 changes: 1 addition & 1 deletion app/Http/Controllers/PostsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function store(Request $request)
$request->validate(
[
'description' => 'required|string|min:4|max:200',
'tags' => 'string|min:3|max:15|nullable',
'tags' => 'string|min:3|max:20|nullable',
'image' => 'image|mimes:jpg,png,jpeg,gif|max:1048|nullable',
'token' => 'required'
]
Expand Down
3 changes: 2 additions & 1 deletion resources/js/Components/Dashboard/CreatePost.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ const CreatePost = ({ props }) => {
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
{isErrorNotif && <NotificationAlert message={props.errors.description} />}
{props.errors && <NotificationAlert message={props.errors.image} />}
{isErrorNotif && props.errors.tags && <NotificationAlert message={props.errors.tags} />}
{isErrorNotif && <NotificationAlert message={props.errors.image} />}
<span>
{!limiter
? "Ngetiknya udah dulu ya, simpen buat postingan berikutnya 👍"
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Components/Homepage/PostsListImaged.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const isPostsWithImage = (posts, from) => {
<figure><img src={`/storage/images/posts/${post.image}`} alt="Post Image" height={200} width={200} /></figure>
<div className="card-body w-80">
{post.hashtag &&
<Link className="card-title" as="a" href={`/?tag=${post.hashtag}`}>
<Link className="card-title w-1/2" as="a" href={`/?tag=${post.hashtag}`}>
<div className="badge badge-primary text-primary-content">#{post.hashtag}</div>
</Link>
}
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Components/Homepage/PostsLists.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const isPosts = (posts, from) => {
href={`/post/${post.id}`} method="get" as="div"
key={i}
className="card cursor-pointer md:py-2 md:px-1 bg-base-100 transition-all duration-300 dark:bg-slate-700 dark:text-white dark:hover:bg-gray-600 w-full md:w-full">
<div className={`card-body rounded-md flex flex-col shadow-md m-2 md:m-0 p-4 justify-between hover:-translate-y-1 hover:bg-primary hover:text-primary-content`}>
<div className={`card-body rounded-md flex flex-col shadow-md m-2 md:m-0 p-4 justify-between hover:-translate-y-1 hover:bg-primary hover:text-primary-content dark:bg-none dark:shadow-none`}>
{post.hashtag &&
<Link className="card-title" as="a" href={`/?tag=${post.hashtag}`}>
<div className="badge badge-primary text-primary-content">#{post.hashtag}</div>
Expand Down