@@ -27,7 +27,6 @@ import {
2727} from '../components/Editor/MobileEditor' ;
2828import IDEOverlays from '../components/IDEOverlays' ;
2929import useIsMobile from '../hooks/useIsMobile' ;
30- import { CrossIcon } from '../../../common/icons' ;
3130
3231function getTitle ( project ) {
3332 const { id } = project ;
@@ -105,7 +104,6 @@ const IDEView = () => {
105104 const [ sidebarSize , setSidebarSize ] = useState ( 160 ) ;
106105 const [ isOverlayVisible , setIsOverlayVisible ] = useState ( false ) ;
107106 const [ MaxSize , setMaxSize ] = useState ( window . innerWidth ) ;
108- const [ displayBanner , setDisplayBanner ] = useState ( true ) ;
109107
110108 const cmRef = useRef ( { } ) ;
111109
@@ -116,45 +114,6 @@ const IDEView = () => {
116114 dispatch ( updateFileContent ( file . id , file . content ) ) ;
117115 } ;
118116
119- const Banner = ( ) => {
120- // temporary banner to display funding opportunities
121- const [ textObj , setTextObj ] = useState ( { } ) ;
122-
123- useEffect ( ( ) => {
124- const grant1 = {
125- copy :
126- 'Learn to make art with AI with the Social Software High School Summer Institute. Apply by June 1!' ,
127- url : 'https://summer.ucla.edu/program/social-software-summer-institute/'
128- } ;
129-
130- const grant2 = {
131- copy :
132- 'Join us in contributing to p5.js——receive a $10,000 opportunity to grow within the contributor community!' ,
133- url : 'https://processingfoundation.org/grants'
134- } ;
135-
136- const allMessages = [ grant1 , grant2 ] ;
137- const randomIndex = Math . floor ( Math . random ( ) * allMessages . length ) ;
138- const randomMessage = allMessages [ randomIndex ] ;
139-
140- setTextObj ( randomMessage ) ;
141- } , [ ] ) ;
142-
143- return (
144- < div className = "banner" >
145- < a href = { textObj . url } > { textObj . copy } </ a >
146- < button
147- className = "banner-close-button"
148- onClick = { ( ) => {
149- setDisplayBanner ( ! displayBanner ) ;
150- } }
151- >
152- < CrossIcon />
153- </ button >
154- </ div >
155- ) ;
156- } ;
157-
158117 useEffect ( ( ) => {
159118 dispatch ( clearPersistedState ( ) ) ;
160119 } , [ dispatch ] ) ;
@@ -211,7 +170,6 @@ const IDEView = () => {
211170 < Helmet >
212171 < title > { getTitle ( project ) } </ title >
213172 </ Helmet >
214- { displayBanner && < Banner /> }
215173 < IDEKeyHandlers getContent = { ( ) => cmRef . current ?. getContent ( ) } />
216174 < WarnIfUnsavedChanges />
217175 < Toast />
0 commit comments