Skip to content

Commit

Permalink
get properties from commonConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
erinz2020 committed Jan 2, 2025
1 parent 57fa4d4 commit df0ba8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 0 additions & 8 deletions frontend/src/hooks/useDocumentTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import useGetSiteSettings from "../models/useGetSiteSettings";
export default function useDocumentTitle() {
const { data: siteSettings } = useGetSiteSettings();

console.log("siteSettings", siteSettings);
document.title = siteSettings?.siteName || "wildbook";
useEffect(() => {
if (!siteSettings) return;
Expand Down Expand Up @@ -35,13 +34,6 @@ export default function useDocumentTitle() {
document.getElementsByTagName("head")[0].appendChild(meta);
}

console.log(
"++++++++++++",
siteSettings.siteDescription,
siteSettings.siteKeywords,
siteSettings.siteAuthor,
);

if (link) {
link.href = iconURL;
} else {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/ecocean/api/SiteSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response)
// note: there is a CommonConfiguration property: htmlShortcutIcon=images/favicon.ico?v=2
settings.put("siteFavicon", "/images/favicon.ico");
settings.put("siteName", CommonConfiguration.getHTMLTitle(context));
settings.put("siteDescription", CommonConfiguration.getHTMLDescription(context));
settings.put("siteKeywords", CommonConfiguration.getHTMLKeywords(context));
settings.put("siteAuthor", CommonConfiguration.getHTMLAuthor(context));
settings.put("locationData", LocationID.getLocationIDStructure());

settings.put("mapCenterLat", CommonConfiguration.getCenterLat(context));
Expand Down

0 comments on commit df0ba8b

Please sign in to comment.