format project
This commit is contained in:
@@ -2,8 +2,8 @@ import { Helmet } from 'react-helmet'
|
||||
import { useIsBrowser } from '@redwoodjs/prerender/browserUtils'
|
||||
|
||||
const Seo = ({
|
||||
title = "CadHub",
|
||||
description = "Edit this part of CadHub",
|
||||
title = 'CadHub',
|
||||
description = 'Edit this part of CadHub',
|
||||
lang = 'en-US',
|
||||
socialImageUrl,
|
||||
}: {
|
||||
|
||||
@@ -41,7 +41,10 @@ export const Success = ({
|
||||
}: CellSuccessProps<FindSocialCardQuery>) => {
|
||||
const image = userProject?.Project?.mainImage
|
||||
const gravatar = userProject?.image
|
||||
const truncatedDescription = userProject?.Project?.description?.length > 150 ? (userProject?.Project?.description || '').slice(0, 145) + ' . . .' : (userProject?.Project?.description || '')
|
||||
const truncatedDescription =
|
||||
userProject?.Project?.description?.length > 150
|
||||
? (userProject?.Project?.description || '').slice(0, 145) + ' . . .'
|
||||
: userProject?.Project?.description || ''
|
||||
return (
|
||||
<div
|
||||
className="flex-col flex h-full bg-ch-gray-800 text-ch-gray-300"
|
||||
@@ -52,8 +55,7 @@ export const Success = ({
|
||||
style={{ gridTemplateColumns: '7fr 5fr' }}
|
||||
>
|
||||
<div className="bg-ch-gray-800 relative">
|
||||
<div className="absolute bottom-0 left-0 transform scale-200 aspect-h-1 h-full -translate-x-24 translate-y-24 rotate-45 rounded-full overflow-hidden">
|
||||
</div>
|
||||
<div className="absolute bottom-0 left-0 transform scale-200 aspect-h-1 h-full -translate-x-24 translate-y-24 rotate-45 rounded-full overflow-hidden"></div>
|
||||
|
||||
<div className="relative bg-ch-gray-760 bg-opacity-90 pt-10 pl-20 pr-12 h-full backdrop-filter backdrop-blur">
|
||||
<div className="flex justify-between items-center">
|
||||
|
||||
@@ -199,9 +199,13 @@ function getParams(target: HTMLElement): RawCustomizerParams {
|
||||
if (
|
||||
numeric[elem.getAttribute('type')] ||
|
||||
elem.getAttribute('numeric') == '1'
|
||||
){
|
||||
) {
|
||||
value = parseFloat(String(value || 0))
|
||||
}else if (value && typeof(value) === 'string' && /^(\d+|\d+\.\d+)$/.test(value.trim())){
|
||||
} else if (
|
||||
value &&
|
||||
typeof value === 'string' &&
|
||||
/^(\d+|\d+\.\d+)$/.test(value.trim())
|
||||
) {
|
||||
value = parseFloat(String(value || 0))
|
||||
}
|
||||
if (elem.type == 'radio' && !elem.checked) return // skip if not checked radio button
|
||||
|
||||
@@ -9,7 +9,12 @@ const IdeProjectPage = ({ userName, projectTitle }) => {
|
||||
)}`
|
||||
return (
|
||||
<>
|
||||
<Seo title={projectTitle} description={projectTitle} socialImageUrl={socialImageUrl} lang="en-US" />
|
||||
<Seo
|
||||
title={projectTitle}
|
||||
description={projectTitle}
|
||||
socialImageUrl={socialImageUrl}
|
||||
lang="en-US"
|
||||
/>
|
||||
<IdeProjectCell userName={userName} projectTitle={projectTitle} />
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user