Skip to content

Commit

Permalink
fix image too small oon bio and search bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmanundercover committed Dec 13, 2023
1 parent 87cbbed commit 53d5726
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/components/BusinessCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ const BusinessCard: FunctionComponent<MainMenuProps> = ({anchor, homePage}) => {

const theme = useTheme()

const smDown = useMediaQuery(theme.breakpoints.down('sm'))

// const pageContext = useContext(PageContext)

const [userBio, setUserBio] = React.useState<ResumeBioSectionType>()
Expand Down Expand Up @@ -115,7 +117,7 @@ const BusinessCard: FunctionComponent<MainMenuProps> = ({anchor, homePage}) => {
<Grid item container style={{
marginBottom: theme.spacing(4),
backgroundRepeat: "none",
minHeight: 250,
minHeight: smDown?350:450,
backgroundSize: "cover",
overflow: "visible",
position: "relative",
Expand Down
9 changes: 6 additions & 3 deletions src/components/block-content-ui/cmsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ const fullTextSearch = (textToSearch: string, pageId: string): Promise<any> => {
return sanityClient
.fetch(
`*[
[
([
title,
careerTitle,
introduction,
Expand All @@ -488,20 +488,22 @@ const fullTextSearch = (textToSearch: string, pageId: string): Promise<any> => {
contentSummaryTitle,
contentSummaryTexts,
videoUrl,
] match '*${textToSearch}*' && references('${pageId}')]{
] match '*${textToSearch}*') && references('${pageId}')]{
...,
"skillsUsed" : skillsUsed[]->,
"skills" : skills[]->,
"skillsHighlighted": skillsHighlighted[]->,
}`,
// {searchText: textToSearch}
).then((data: any) => {
console.log("results from full text search", data, textToSearch, pageId)
return data
})
}
const skillReferenceSearch = (skill: ResumeSkill, pageId: string): Promise<any> => {
return sanityClient
.fetch(
`*[references($searchText)]{
`*[references($searchText) && references('${pageId}')]{
...,
"skillsHighlighted": skillsHighlighted[]->,
"skillsUsed" : skillsUsed[]->,
Expand All @@ -521,6 +523,7 @@ const skillReferenceSearch = (skill: ResumeSkill, pageId: string): Promise<any>

return -1
})
console.log("results from skills reference search", data, skill._id, pageId)

return data
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface LogoProps {

const Logo: FunctionComponent<LogoProps> = (props) => {
const classes = useStyles({logoImageSrc: props.logoImageSrc, height: props.height})
console.log(props.logoImageSrc && urlFor(props.logoImageSrc).height(props.height ?? 0).url())

return !props.logoText ?
<Grid item container className={classes.imageRoot}
style={{backgroundPosition: props.isCenter ? "center" : "left"}}/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const ResumeBioSection: FunctionComponent<IProps> = (props: IProps) => {
backgroundSize: "cover",
backgroundPosition: "top right",
backgroundRepeat: "no-repeat",
minHeight: "350px"
minHeight: smDown?"500px":"450px"
}}>
</Grid>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const WebDevHowItWorksStep: FunctionComponent<IProps> = (props: IProps) => {
{props.step.learnMoreText && props.step?.learnMoreText.length > 0 &&
<Button fullWidth
onClick={() =>
firebaseAnalyticsClient.ctaClick(props.step.slug?.current ?? "", props.step.learnMoreText, pageContext.analyticsId,)
firebaseAnalyticsClient.ctaClick(props.step.slug?.current ?? "", props.step.learnMoreText ?? "", pageContext.analyticsId,)

} color='primary' href={props.step.learnMoreLink}
variant='outlined'><Typography variant='button'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const WebDevServiceItem: FunctionComponent<IProps> = (props: IProps) => {
{props.service.learnMoreText && props.service?.learnMoreText.length > 0 &&
<Button fullWidth
onClick={() =>
firebaseAnalyticsClient.ctaClick(props.service.slug?.current ?? "", props.service.learnMoreText, pageContext.analyticsId,)
firebaseAnalyticsClient.ctaClick(props.service.slug?.current ?? "", props.service.learnMoreText ?? "", pageContext.analyticsId,)

} color='primary' href={props.service.learnMoreLink}
variant='contained'><Typography variant='button'
Expand Down

0 comments on commit 53d5726

Please sign in to comment.