the browser-facing portion of osu!

Typescript comments index/show entrypoints

nanaya d04ff2cc 3ac43de7

+16 -14
+8 -7
resources/js/entrypoints/comments-index.tsx
··· 1 - # Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 2 - # See the LICENCE file in the repository root for full licence text. 1 + // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 2 + // See the LICENCE file in the repository root for full licence text. 3 3 4 - import CommentsIndex from 'comments-index' 5 - import core from 'osu-core-singleton' 6 - import { createElement } from 'react' 4 + import CommentsIndex from 'comments-index'; 5 + import core from 'osu-core-singleton'; 6 + import * as React from 'react'; 7 7 8 - core.reactTurbolinks.register 'comments-index', -> 9 - createElement(CommentsIndex, controllerStateSelector: '#json-index') 8 + core.reactTurbolinks.register('comments-index', () => ( 9 + <CommentsIndex controllerStateSelector='#json-index' /> 10 + ));
+8 -7
resources/js/entrypoints/comments-show.tsx
··· 1 - # Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 2 - # See the LICENCE file in the repository root for full licence text. 1 + // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 2 + // See the LICENCE file in the repository root for full licence text. 3 3 4 - import CommentsShow from 'comments-show' 5 - import core from 'osu-core-singleton' 6 - import { createElement } from 'react' 4 + import CommentsShow from 'comments-show'; 5 + import core from 'osu-core-singleton'; 6 + import * as React from 'react'; 7 7 8 - core.reactTurbolinks.register 'comments-show', -> 9 - createElement(CommentsShow, controllerStateSelector: '#json-show') 8 + core.reactTurbolinks.register('comments-show', () => ( 9 + <CommentsShow controllerStateSelector='#json-show' /> 10 + ));