import { useEffect, useMemo, useRef, useState } from 'react';
import { Link } from 'react-router-dom';
import { Button, Flex, Icon, NFAPreview } from '@/components';
import { parseNumberToHexColor } from '@/utils/color';
import { IndexedNFA } from '../indexed-nfa.context';
import { IndexedNFAStyles as S } from '../indexed-nfa.styles';
const Preview: React.FC = () => {
const { nfa } = IndexedNFA.useContext();
const color = useMemo(
() => `#${parseNumberToHexColor(nfa.color ?? '')}`,
[nfa]
);
return (
);
};
const CreateAccessPoint: React.FC = () => {
const { nfa } = IndexedNFA.useContext();
return (
Host NFA Frontend
{/* TODO: replace with correct text */}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vitae
ante erat. Sed quis finibus diam.
{/* TODO: place correct href */}
Learn more
);
};
export const IndexedNFAAsideFragment: React.FC = () => {
const ref = useRef(null);
const [top, setTop] = useState();
useEffect(() => {
setTop(ref.current?.getBoundingClientRect().top);
}, [ref]);
return (
);
};