File tree Expand file tree Collapse file tree 1 file changed +27
-8
lines changed Expand file tree Collapse file tree 1 file changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { render } from 'react-dom';
33import { Provider } from 'react-redux' ;
44import { Router } from 'react-router-dom' ;
55
6+ import { useTranslation } from 'react-i18next' ;
67import browserHistory from './browserHistory' ;
78import configureStore from './store' ;
89import Routing from './routes' ;
6364 document . body . appendChild ( buttonScript ) ;
6465}
6566
66- const App = ( ) => (
67- < div >
68- < Router history = { browserHistory } >
69- < SkipLink targetId = "play-sketch" text = "PlaySketch" />
70- < Routing />
71- </ Router >
72- </ div >
73- ) ;
67+ const App = ( ) => {
68+ const { t } = useTranslation ( ) ;
69+
70+ setTimeout ( ( ) => {
71+ const donateButton = document . getElementsByClassName (
72+ 'dbox-donation-button'
73+ ) [ 0 ] ;
74+
75+ if ( donateButton ) {
76+ const donateLogoImage = document . createElement ( 'img' ) ;
77+ donateLogoImage . src = 'https://donorbox.org/images/white_logo.svg' ;
78+
79+ donateButton . text = t ( 'About.Donate' ) ;
80+ donateButton . prepend ( donateLogoImage ) ;
81+ }
82+ } , 0 ) ;
83+
84+ return (
85+ < div >
86+ < Router history = { browserHistory } >
87+ < SkipLink targetId = "play-sketch" text = "PlaySketch" />
88+ < Routing />
89+ </ Router >
90+ </ div >
91+ ) ;
92+ } ;
7493
7594render (
7695 < Provider store = { store } >
You can’t perform that action at this time.
0 commit comments