Skip to content

Commit

Permalink
Typescript comments index/show entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Jul 31, 2023
1 parent 3ac43de commit d04ff2c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
15 changes: 8 additions & 7 deletions resources/js/entrypoints/comments-index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
# See the LICENCE file in the repository root for full licence text.
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

import CommentsIndex from 'comments-index'
import core from 'osu-core-singleton'
import { createElement } from 'react'
import CommentsIndex from 'comments-index';
import core from 'osu-core-singleton';
import * as React from 'react';

core.reactTurbolinks.register 'comments-index', ->
createElement(CommentsIndex, controllerStateSelector: '#json-index')
core.reactTurbolinks.register('comments-index', () => (
<CommentsIndex controllerStateSelector='#json-index' />
));
15 changes: 8 additions & 7 deletions resources/js/entrypoints/comments-show.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
# See the LICENCE file in the repository root for full licence text.
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

import CommentsShow from 'comments-show'
import core from 'osu-core-singleton'
import { createElement } from 'react'
import CommentsShow from 'comments-show';
import core from 'osu-core-singleton';
import * as React from 'react';

core.reactTurbolinks.register 'comments-show', ->
createElement(CommentsShow, controllerStateSelector: '#json-show')
core.reactTurbolinks.register('comments-show', () => (
<CommentsShow controllerStateSelector='#json-show' />
));

0 comments on commit d04ff2c

Please sign in to comment.