import { createViewportObserver } from '@solid-primitives/intersection-observer';

import { useStore } from '../../store/index';
import type { Store } from '../../store/index';
import styles from './Projects.module.css';

export default () => {
  const [, { setVisibleChapter }] = useStore() as Store;
  const [observer] = createViewportObserver({threshold: 0.9});

  return (
    <div
      use:observer={(event) => {
        if (event.isIntersecting) {
          setVisibleChapter('projects');
        }}
      }
      class={styles.Projects}
    >
      
    </div>
  )
};
