Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
carina-akaia committed Oct 12, 2023
1 parent d5fe82a commit c598797
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 233 deletions.
194 changes: 0 additions & 194 deletions src/gigs-board/entity/post/CompactPost.jsx

This file was deleted.

5 changes: 1 addition & 4 deletions src/gigs-board/entity/post/card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ const header = (
{editControl}
{timestamp}

{widget("entity.post.History", {
{widget("entity.post.history", {
post,
timestamp: currentTimestamp,
})}
Expand Down Expand Up @@ -535,7 +535,6 @@ function Editor() {
: undefined,

mode: "Create",
onDraftStateChange: props.onDraftStateChange,
parent_id: postId,
post_type: state.post_type,
}
Expand All @@ -548,7 +547,6 @@ function Editor() {
draftState?.edit_post_id === postId ? draftState : undefined,

mode: "Edit",
onDraftStateChange: props.onDraftStateChange,
post_type: state.post_type,

sponsorship_token: tokenResolver(
Expand Down Expand Up @@ -639,7 +637,6 @@ const postsList =
{
id: childId,
isUnderPost: true,
onDraftStateChange: props.onDraftStateChange,
draftState,

expandParent: () =>
Expand Down
3 changes: 1 addition & 2 deletions src/gigs-board/entity/post/editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ const PostEditor = ({
draftState,
github_link,
onCancel,
onDraftStateChange,
parent_id,
referral,
requested_sponsor,
Expand All @@ -208,7 +207,7 @@ const PostEditor = ({
/**
* Should always be updated along with `state.tags`
*/
tagOptions: tags.map((tag) => ({ name: tag })),
tagOptions: (tags ?? []).map((tag) => ({ name: tag })),
name: name ?? "",
description: description ?? "",
amount: requested_sponsorship_amount ?? amount ?? "0",
Expand Down
4 changes: 2 additions & 2 deletions src/gigs-board/entity/post/search_panel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ return (
</div>
)}
{state.term && state.term.length > 1 && state.searchResult
? widget("entity.post.List", {
? widget("entity.post.list", {
searchResult: {
postIds: state.searchResult,
keywords: Object.fromEntries(
Expand All @@ -773,7 +773,7 @@ return (
tag: props.tag,
author: props.author,
})
: widget("entity.post.List", {
: widget("entity.post.list", {
recency: props.recency,
tag: props.tag,
author: props.author,
Expand Down
8 changes: 4 additions & 4 deletions src/gigs-board/entity/post/spawner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ const PostSpawner = ({ isHidden, onCancel, tags }) => {
</button>
))}
</div>
</div>

<p className="text-muted w-75 my-1">
{postTypeOptions[state.post_type].description}
</p>
<p className="text-muted w-75">
{postTypeOptions[state.post_type].description}
</p>
</div>

{widget("entity.post.editor", {
mode: "Create",
Expand Down
2 changes: 1 addition & 1 deletion src/gigs-board/pages/community/activity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const CommunityActivityPage = ({ handle }) => {
tags: [communityData.tag],
})}

{widget("entity.post.List", { tag: communityData.tag })}
{widget("entity.post.list", { tag: communityData.tag })}
</div>
</div>

Expand Down
32 changes: 6 additions & 26 deletions src/gigs-board/pages/new_post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,29 +122,9 @@ const NewPostPage = ({ transactionHashes }) => {
}));

return widget("components.template.app-layout", {
banner: (
<div aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a
className="fw-bold"
href={href("Feed")}
style={{ color: "#3252A6" }}
>
DevHub
</a>
</li>

<li class="breadcrumb-item active" aria-current="page">
New post
</li>
</ol>
</div>
),

children: (
<div
className="d-flex flex-column align-items-center gap-4 p-4"
className="d-flex flex-column gap-4 p-4 bg-light"
data-bs-parent={`#accordion${postId}`}
id={`${state.post_type}_post_spawner`}
>
Expand All @@ -162,7 +142,7 @@ const NewPostPage = ({ transactionHashes }) => {
</p>
) : (
<>
<div className="d-flex flex-column gap-3">
<div className="d-flex flex-column gap-3 w-100">
<p className="card-title fw-bold fs-6">
What do you want to create?
</p>
Expand All @@ -187,11 +167,11 @@ const NewPostPage = ({ transactionHashes }) => {
</button>
))}
</div>
</div>

<p className="text-muted w-75 my-1">
{postTypeOptions[state.post_type].description}
</p>
<p className="text-muted w-75">
{postTypeOptions[state.post_type].description}
</p>
</div>

{widget("entity.post.editor", {
mode: "Create",
Expand Down

0 comments on commit c598797

Please sign in to comment.