Skip to content

Commit

Permalink
子コンポーネントとの名前の衝突を避けるため、質問ページの答え部分の親のVueファイルをリネーム
Browse files Browse the repository at this point in the history
  • Loading branch information
junohm410 committed Feb 26, 2024
1 parent ba274fd commit 3310ec0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ div
<script>
import CSRF from 'csrf'
import AIAnswer from 'components/ai-answer.vue'
import Answers from '../answers.vue'
import Answers from 'answers.vue'
import CommentPlaceholder from '../comment-placeholder.vue'
export default {
name: 'Answers',
name: 'QuestionAnswers',
components: {
commentPlaceholder: CommentPlaceholder,
ai_answer: AIAnswer,
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import UserMentorMemo from '../components/user_mentor_memo.vue'
import UserRecentReports from '../components/user-recent-reports.vue'
import Talks from '../components/talks.vue'
import Footprints from '../components/footprints.vue'
import Answers from '../components/answers.vue'
import QuestionAnswers from '../components/question-answers.vue'
import SadReports from '../components/sad_reports.vue'
import UserProducts from '../components/user-products.vue'
import MentorPractices from '../components/mentor-practices.vue'
Expand All @@ -99,7 +99,7 @@ mounter.addComponent(UserMentorMemo)
mounter.addComponent(UserRecentReports)
mounter.addComponent(Talks)
mounter.addComponent(Footprints)
mounter.addComponent(Answers)
mounter.addComponent(QuestionAnswers)
mounter.addComponent(SadReports)
mounter.addComponent(UserProducts)
mounter.addComponent(MentorPractices)
Expand Down
2 changes: 1 addition & 1 deletion app/views/questions/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ hr.a-border
.question.page-content
= render 'question_header', question: @question
= render 'question_body', question: @question
div(data-vue="Answers" data-vue-current-user-id:number="#{current_user.id}" data-vue-question-id="#{@question.id}")
div(data-vue="QuestionAnswers" data-vue-current-user-id:number="#{current_user.id}" data-vue-question-id="#{@question.id}")

nav.a-side-nav
.a-side-nav__inner
Expand Down

0 comments on commit 3310ec0

Please sign in to comment.