-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix ui bugs * more fixes * fix background issue too * final tweak * neurotic spacing
- Loading branch information
1 parent
3797c76
commit 6653ad1
Showing
11 changed files
with
229 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { paths } from "gen/api"; | ||
import ListingArtifacts from "./ListingArtifacts"; | ||
import ListingChildren from "./ListingChildren"; | ||
import ListingDescription from "./ListingDescription"; | ||
|
||
type ListingResponse = | ||
paths["/listings/{id}"]["get"]["responses"][200]["content"]["application/json"]; | ||
|
||
interface ListingBodyProps { | ||
listing: ListingResponse; | ||
} | ||
|
||
const ListingBody = (props: ListingBodyProps) => { | ||
const { listing } = props; | ||
return ( | ||
<div className="px-4"> | ||
<ListingDescription | ||
description={listing.description} | ||
edit={listing.owner_is_user} | ||
/> | ||
<ListingChildren | ||
child_ids={listing.child_ids} | ||
edit={listing.owner_is_user} | ||
/> | ||
<ListingArtifacts listing_id={listing.id} edit={listing.owner_is_user} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ListingBody; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import ListingDeleteButton from "./ListingDeleteButton"; | ||
|
||
interface Props { | ||
listing_id: string; | ||
edit: boolean; | ||
} | ||
|
||
const ListingFooter = ({ listing_id, edit }: Props) => { | ||
if (!edit) { | ||
return <></>; | ||
} | ||
|
||
return ( | ||
<div className="flex justify-end border-t p-4"> | ||
<ListingDeleteButton listing_id={listing_id} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ListingFooter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Button } from "components/ui/Button/Button"; | ||
import { FaTimes } from "react-icons/fa"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
interface Props { | ||
title: string; | ||
edit: boolean; | ||
} | ||
|
||
const CloseButton = () => { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<Button | ||
onClick={() => navigate(-1)} | ||
variant="outline" | ||
className="hover:bg-gray-200 dark:hover:bg-gray-700 bg-opacity-50" | ||
> | ||
<span className="md:hidden block mr-2">Close</span> | ||
<FaTimes /> | ||
</Button> | ||
); | ||
}; | ||
|
||
const ListingHeader = (props: Props) => { | ||
const { title } = props; | ||
return ( | ||
<div className="relative border-b p-4 mb-4"> | ||
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto] gap-4"> | ||
<h1 className="text-2xl font-bold">{title}</h1> | ||
<CloseButton /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ListingHeader; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.