feat(ui): add ctaUrl field to Process block and link ArrowLink
This commit is contained in:
@@ -6,7 +6,7 @@ import { ArrowLink } from '../../components/ArrowLink'
|
||||
|
||||
type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'process' }>
|
||||
|
||||
export const ProcessBlock: React.FC<Props> = ({ subtitle, title, steps, ctaText, image }) => {
|
||||
export const ProcessBlock: React.FC<Props> = ({ subtitle, title, steps, ctaText, ctaUrl, image }) => {
|
||||
const processMedia = typeof image === 'object' && image !== null ? (image as Media) : null;
|
||||
const imageUrl = processMedia?.url || 'https://images.unsplash.com/photo-1611162617474-5b21e879e113?auto=format&fit=crop&w=1200&q=80';
|
||||
const imageAlt = processMedia?.alt || 'Proces współpracy';
|
||||
@@ -52,7 +52,7 @@ export const ProcessBlock: React.FC<Props> = ({ subtitle, title, steps, ctaText,
|
||||
|
||||
{ctaText && (
|
||||
<div className="mt-4">
|
||||
<ArrowLink href="/jak-sie-umowic">
|
||||
<ArrowLink href={ctaUrl || '#'}>
|
||||
{ctaText}
|
||||
</ArrowLink>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user