@@ -3,6 +3,7 @@ import { render } from 'react-dom';
3
3
import { Provider } from 'react-redux' ;
4
4
import { Router } from 'react-router-dom' ;
5
5
6
+ import { useTranslation } from 'react-i18next' ;
6
7
import browserHistory from './browserHistory' ;
7
8
import configureStore from './store' ;
8
9
import Routing from './routes' ;
63
64
document . body . appendChild ( buttonScript ) ;
64
65
}
65
66
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
+ } ;
74
93
75
94
render (
76
95
< Provider store = { store } >
0 commit comments