passing dependencies as props and rendering them in IssueDetail instead of lazy-loading via hx-get
This commit is contained in:
@@ -60,7 +60,7 @@ templ IssueDetailContent(props IssueDetailProps) {
|
||||
}
|
||||
</div>
|
||||
<div id="issue-detail-container" class="mb-6">
|
||||
@components.IssueDetail(components.IssueDetailProps{Issue: props.Issue})
|
||||
@components.IssueDetail(components.IssueDetailProps{Issue: props.Issue, From: props.From})
|
||||
</div>
|
||||
@components.CommentSection(components.CommentSectionProps{
|
||||
IssueID: props.Issue.ID,
|
||||
@@ -78,7 +78,7 @@ templ IssueDetail(props IssueDetailProps) {
|
||||
templ IssueDetailModalContent(props IssueDetailModalProps) {
|
||||
<div class="w-full">
|
||||
<div id="issue-detail-container" class="mb-6">
|
||||
@components.IssueDetail(components.IssueDetailProps{Issue: props.Issue})
|
||||
@components.IssueDetail(components.IssueDetailProps{Issue: props.Issue, From: props.From})
|
||||
</div>
|
||||
@components.CommentSection(components.CommentSectionProps{
|
||||
IssueID: props.Issue.ID,
|
||||
|
||||
@@ -113,7 +113,7 @@ func IssueDetailContent(props IssueDetailProps) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = components.IssueDetail(components.IssueDetailProps{Issue: props.Issue}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = components.IssueDetail(components.IssueDetailProps{Issue: props.Issue, From: props.From}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -208,7 +208,7 @@ func IssueDetailModalContent(props IssueDetailModalProps) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = components.IssueDetail(components.IssueDetailProps{Issue: props.Issue}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = components.IssueDetail(components.IssueDetailProps{Issue: props.Issue, From: props.From}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user