Skip to content

Commit

Permalink
Updated Panel Options
Browse files Browse the repository at this point in the history
  • Loading branch information
koechkevin committed Oct 31, 2024
1 parent 4de4b75 commit 1cf7e6a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ function DropdownSearch({
onChange={handleChange}
placeholder={placeholder}
value={query}
{...props}
sx={({ typography, palette }) => ({
borderRadius: typography.pxToRem(10),
color: palette.primary.main,
Expand Down
5 changes: 0 additions & 5 deletions apps/climatemappedafrica/src/components/Hero/Hero.snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,11 @@ exports[`<Hero /> renders unchanged 1`] = `
Search for a location
</p>
<div
blocktype="hero"
boundary="[object Object]"
class="MuiInputBase-root MuiInputBase-colorPrimary MuiInputBase-adornedEnd css-78q71b-MuiInputBase-root"
location="[object Object]"
slug="hero"
>
<input
aria-label="search"
class="MuiInputBase-input MuiInputBase-inputAdornedEnd css-yz9k0d-MuiInputBase-input"
id="670e3996766697e7feb349d5"
placeholder="Search for a location"
type="text"
value=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
async function explorePage({ block: { slugs }, hurumap }) {
const {
rootGeography,
scrollToTopLabel,
dataNotAvailable,
labels: { dataNotAvailable, scrollToTop: scrollToTopLabel },
items: panelItems,
page: { value },
} = hurumap;
Expand Down Expand Up @@ -36,12 +35,10 @@ async function explorePage({ block: { slugs }, hurumap }) {
profile.push(secondaryProfile);
}

// TODO: Move this to a PayloadCMS
const panel = {
panelItems,
scrollToTopLabel,
dataNotAvailable,
blockId: "explore-page",
};
const res = {
id: "explore-page",
Expand Down
2 changes: 1 addition & 1 deletion apps/climatemappedafrica/src/lib/data/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function getNavBar(siteSettings, variant, { slug }) {
export async function getPageProps(api, context) {
// For now, ClimatemappedAfrica only supports single paths i.e. /, /about, etc.,
// so params.slug[0] is good enough
const slugs = context.params?.slugs || ["index"];
const slugs = context.params?.slugs || undefined;
const [slug] = slugs || ["index"];
const { draftMode = false } = context;
const options = { draft: draftMode };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,34 @@ const PanelOptions = {
],
},
{
type: "row",
type: "group",
label: "Labels",
name: "labels",
fields: [
{
name: "scrollToTopLabel",
type: "text",
label: "Scroll To Top Label",
defaultValue: "Scroll To Top",
admin: {
width: "50%",
},
localized: true,
},
{
name: "dataNotAvailable",
type: "text",
label: "Data Not Available",
defaultValue: "DATA NOT AVAILABLE",
admin: {
width: "50%",
},
localized: true,
type: "row",
fields: [
{
name: "scrollToTop",
type: "text",
label: "Scroll To Top",
defaultValue: "Scroll To Top",
admin: {
width: "50%",
},
localized: true,
},
{
name: "dataNotAvailable",
type: "text",
label: "Data Not Available",
defaultValue: "DATA NOT AVAILABLE",
admin: {
width: "50%",
},
localized: true,
},
],
},
],
},
Expand Down

0 comments on commit 1cf7e6a

Please sign in to comment.