Skip to content

Commit

Permalink
feat(frontend): add 'Start Mapping' call to action button on homepage…
Browse files Browse the repository at this point in the history
… cards (#1968)
  • Loading branch information
spwoodcock authored Dec 9, 2024
1 parent 9c96041 commit 3eadf55
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/frontend/src/components/home/ExploreProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ export default function ExploreProjectCard({ data }: { data: projectType }) {
fontSize: 22,
},
},
button: {
marginTop: '1rem',
marginLeft: '2%',
padding: '0.5rem 1rem',
fontSize: defaultTheme.typography.h5.fontSize,
fontWeight: 'bold',
},
};

return (
Expand Down Expand Up @@ -101,6 +108,23 @@ export default function ExploreProjectCard({ data }: { data: projectType }) {
{data?.location_str}
</p>
</div>

{/* Start Mapping Button */}
<div className="fmtm-mt-[2%] fmtm-mr-[3%]">
<CoreModules.Button
variant="contained"
color="error"
style={cardInnerStyles.button}
onClick={(e) => {
// Prevent card click
e.stopPropagation();
// Redirect without opening new tab
window.location.href = `/mapnow/${data.id}`;
}}
>
Start Mapping
</CoreModules.Button>
</div>
</CoreModules.Stack>
</div>

Expand Down
4 changes: 4 additions & 0 deletions src/frontend/src/store/slices/ThemeSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ const initialState: themeStateType = {
fontFamily: 'BarlowLight',
fontSize: 16,
},
h5: {
fontFamily: 'BarlowLight',
fontSize: 14,
},
p: {
fontFamily: 'Archivo',
fontSize: 16,
Expand Down

0 comments on commit 3eadf55

Please sign in to comment.