You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It relies on ids on the page and simply scrolls you to the right heading. The problem is that throughout the year a service may have some parts missing, but we still have TOC entries lingering in place.
There may be two possible solutions:
have some special component like <TOCEntry id="nachalo" label="Начало"/>. Then we could statically parse these files at build time and extract all such headings and build up some JSON file with information that we have extracted from them. We could do it either as a Babel plugin, webpack plugin, MDX plugin or even standalone shell script that we'd manually hook up to the build script. The tricky part here is that this component may exist not only in the main service file, but also in any of its sub components... But we can gather all such components from the current service folder...
gather the TOC directly from DOM in useEffect. Like our grandfathers did it...
The text was updated successfully, but these errors were encountered:
Currently we statically define TOC in files like this one: https://github.com/dimaip/calendar/blob/master/app/containers/Service/Texts/Vespers/TOC.tsx
It relies on ids on the page and simply scrolls you to the right heading. The problem is that throughout the year a service may have some parts missing, but we still have TOC entries lingering in place.
There may be two possible solutions:
<TOCEntry id="nachalo" label="Начало"/>
. Then we could statically parse these files at build time and extract all such headings and build up some JSON file with information that we have extracted from them. We could do it either as a Babel plugin, webpack plugin, MDX plugin or even standalone shell script that we'd manually hook up to the build script. The tricky part here is that this component may exist not only in the main service file, but also in any of its sub components... But we can gather all such components from the current service folder...useEffect
. Like our grandfathers did it...The text was updated successfully, but these errors were encountered: