unify components and layout
This commit is contained in:
@@ -6,14 +6,12 @@ import (
|
||||
)
|
||||
|
||||
type IssueDetailProps struct {
|
||||
Issue models.Issue
|
||||
DisplayOwner string
|
||||
DisplayAssignee string
|
||||
Comments []*models.Comment
|
||||
Issue *models.Issue
|
||||
Comments []*models.Comment
|
||||
}
|
||||
|
||||
templ IssueDetailContent(props IssueDetailProps) {
|
||||
<div class="container mx-auto px-4 py-6">
|
||||
<div class="p-2">
|
||||
<div class="mb-4">
|
||||
<a
|
||||
class="btn btn-ghost btn-sm"
|
||||
@@ -27,7 +25,7 @@ templ IssueDetailContent(props IssueDetailProps) {
|
||||
</a>
|
||||
</div>
|
||||
<div class="mb-6">
|
||||
@components.IssueDetailCard(components.IssueDetailCardProps{Issue: props.Issue, DisplayOwner: props.DisplayOwner, DisplayAssignee: props.DisplayAssignee})
|
||||
@components.IssueDetail(components.IssueDetailProps{Issue: props.Issue})
|
||||
</div>
|
||||
@components.CommentSection(components.CommentSectionProps{
|
||||
IssueID: props.Issue.ID,
|
||||
@@ -37,7 +35,7 @@ templ IssueDetailContent(props IssueDetailProps) {
|
||||
}
|
||||
|
||||
templ IssueDetail(props IssueDetailProps) {
|
||||
@BaseLayout(BaseLayoutProps{SearchQuery: ""}) {
|
||||
@BaseLayout() {
|
||||
@IssueDetailContent(props)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user