24 lines
705 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* eslint-disable react/forbid-component-props */
import { FormContext } from './context/form-context';
import * as apiIUS from '@/api/ius/query';
import Link from 'next/link';
import { useContext } from 'react';
import { Heading } from 'ui';
export function Header() {
const { createUrl } = useContext(FormContext);
return apiIUS.getConfig({ createUrl }).then(({ title }) => (
<div className="flex justify-between">
<Heading size={2}>{title}</Heading>
<Link
href={'/ius' + createUrl('/conditions')}
className="text-primary-600 text-sm font-medium hover:underline"
prefetch
>
Посмотреть условия
</Link>
</div>
));
}