Skip to content

Commit 835de09

Browse files
authored
Merge pull request #3141 from processing/task/remove-banner
Remove Banner Content
2 parents 76c41e0 + 6389d8f commit 835de09

File tree

2 files changed

+0
-65
lines changed

2 files changed

+0
-65
lines changed

client/modules/IDE/pages/IDEView.jsx

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
} from '../components/Editor/MobileEditor';
2828
import IDEOverlays from '../components/IDEOverlays';
2929
import useIsMobile from '../hooks/useIsMobile';
30-
import { CrossIcon } from '../../../common/icons';
3130

3231
function 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 />

client/styles/layout/_ide.scss

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,6 @@
1616
width: 100%;
1717
}
1818

19-
.banner {
20-
width: 100%;
21-
min-height: 2.2rem;
22-
text-align: center;
23-
padding: 0.5rem;
24-
font-weight: bold;
25-
border-bottom: 1px dashed #A6A6A6;
26-
27-
@media (max-width: 770px) {
28-
min-height: 3.3rem;
29-
}
30-
}
31-
32-
.banner-close-button{
33-
display: flex;
34-
flex-direction: column;
35-
align-items: center;
36-
justify-content: center;
37-
height: 20px;
38-
width:20px;
39-
float: right;
40-
}
41-
4219
.sidebar {
4320
width: 100%;
4421
height: 100%;

0 commit comments

Comments
 (0)