Skip to content

Commit

Permalink
#1221 use hub specific header image
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco committed Apr 4, 2023
1 parent eca741f commit 7e70db4
Show file tree
Hide file tree
Showing 6 changed files with 318 additions and 22 deletions.
15 changes: 9 additions & 6 deletions frontend/pages/hubs/[hubUrl].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const useStyles = makeStyles((theme) => ({
const DESCRIPTION_WEBFLOW_LINKS = {
energy: {
en: "energy-en",
de: "energie-de"
de: "energie-de",
},
mobility: {
de: "mobilitat-de",
Expand All @@ -62,8 +62,8 @@ const DESCRIPTION_WEBFLOW_LINKS = {
},
landuse: {
de: "landuse-de",
en: "landuse-en"
}
en: "landuse-en",
},
};

//potentially switch back to getinitialprops here?!
Expand Down Expand Up @@ -172,9 +172,11 @@ export default function Hub({
setTabsWhereFiltersWereApplied([]);
};

useEffect(async () => {
const retrievedHubAmbassador = await getHubAmbassadorData(hubUrl, locale);
setHubAmbassador(retrievedHubAmbassador);
useEffect(() => {
(async () => {
const retrievedHubAmbassador = await getHubAmbassadorData(hubUrl, locale);
setHubAmbassador(retrievedHubAmbassador);
})();
}, []);

//Refs and state for tutorial
Expand Down Expand Up @@ -249,6 +251,7 @@ export default function Hub({
headerBackground="#FFF"
image={getImageUrl(image)}
isHubPage
hubName={name}
hideDonationCampaign
customFooterImage={hubData.custom_footer_image && getImageUrl(hubData.custom_footer_image)}
>
Expand Down
59 changes: 59 additions & 0 deletions frontend/public/images/hub_logos/ch_erlangen_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7e70db4

Please sign in to comment.