Skip to content

Commit

Permalink
Renamed folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrogenous committed Jan 9, 2024
1 parent 8993432 commit e1b0d78
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 6 deletions.
29 changes: 29 additions & 0 deletions components/templates/templateFeaturesAnimation/useVisible.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React, { useState, useEffect } from 'react';

const useVisible = (element, rootMargin = 0.2) => {
const [isVisible, setIsVisible] = useState(false);

useEffect(() => {
const observer = new IntersectionObserver(
([entry]) => {
setIsVisible(entry.isIntersecting);
},
{ threshold: rootMargin },
);

if (element.current) {
observer.observe(element.current);
}

return () => {
if (observer && element.current) {
observer.unobserve(element.current)
}
}

}, []);

return isVisible;
};

export default useVisible;
2 changes: 1 addition & 1 deletion pages/templates/apollo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import TemplateYoutube from '@/components/templates/TemplateYoutube';
import TemplateFeatures from '@/components/templates/TemplateFeatures';
import TemplateConfiguration from '@/components/templates/TemplateConfiguration';
import TemplateRelated from '@/components/templates/TemplateRelated';
import TemplateFeaturesAnimation from '@/components/templates/templatefeaturesanimation/TemplateFeaturesAnimation';
import TemplateFeaturesAnimation from '@/components/templates/templateFeaturesAnimation';
import TemplateSeparator from '@/components/templates/TemplateSeparator';
import TemplateHero from '@/components/templates/templateHero/TemplateHero';
import ApolloLogo from './ApolloLogo';
Expand Down
2 changes: 1 addition & 1 deletion pages/templates/atlantis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import TemplateYoutube from '@/components/templates/TemplateYoutube';
import TemplateFeatures from '@/components/templates/TemplateFeatures';
import TemplateConfiguration from '@/components/templates/TemplateConfiguration';
import TemplateRelated from '@/components/templates/TemplateRelated';
import TemplateFeaturesAnimation from '@/components/templates/templatefeaturesanimation/TemplateFeaturesAnimation';
import TemplateFeaturesAnimation from '@/components/templates/templateFeaturesAnimation';
import TemplateSeparator from '@/components/templates/TemplateSeparator';
import TemplateHero from '@/components/templates/templateHero/TemplateHero';
import AtlantisLogo from './AtlantisLogo';
Expand Down
2 changes: 1 addition & 1 deletion pages/templates/diamond/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import TemplateYoutube from '@/components/templates/TemplateYoutube';
import TemplateFeatures from '@/components/templates/TemplateFeatures';
import TemplateConfiguration from '@/components/templates/TemplateConfiguration';
import TemplateRelated from '@/components/templates/TemplateRelated';
import TemplateFeaturesAnimation from '@/components/templates/templatefeaturesanimation/TemplateFeaturesAnimation';
import TemplateFeaturesAnimation from '@/components/templates/templateFeaturesAnimation';
import TemplateSeparator from '@/components/templates/TemplateSeparator';
import TemplateHero from '@/components/templates/templateHero/TemplateHero';
import DiamondLogo from './DiamondLogo';
Expand Down
2 changes: 1 addition & 1 deletion pages/templates/freya/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import TemplateYoutube from '@/components/templates/TemplateYoutube';
import TemplateFeatures from '@/components/templates/TemplateFeatures';
import TemplateConfiguration from '@/components/templates/TemplateConfiguration';
import TemplateRelated from '@/components/templates/TemplateRelated';
import TemplateFeaturesAnimation from '@/components/templates/templatefeaturesanimation/TemplateFeaturesAnimation';
import TemplateFeaturesAnimation from '@/components/templates/templateFeaturesAnimation';
import TemplateSeparator from '@/components/templates/TemplateSeparator';
import TemplateHero from '@/components/templates/templateHero/TemplateHero';
import FreyaLogo from './FreyaLogo';
Expand Down
2 changes: 1 addition & 1 deletion pages/templates/ultima/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import TemplateYoutube from '@/components/templates/TemplateYoutube';
import TemplateFeatures from '@/components/templates/TemplateFeatures';
import TemplateConfiguration from '@/components/templates/TemplateConfiguration';
import TemplateRelated from '@/components/templates/TemplateRelated';
import TemplateFeaturesAnimation from '@/components/templates/templatefeaturesanimation/TemplateFeaturesAnimation';
import TemplateFeaturesAnimation from '@/components/templates/templateFeaturesAnimation';
import TemplateSeparator from '@/components/templates/TemplateSeparator';
import TemplateHero from '@/components/templates/templateHero/TemplateHero';
import UltimaLogo from './UltimaLogo';
Expand Down
2 changes: 1 addition & 1 deletion pages/templates/verona/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import TemplateYoutube from '@/components/templates/TemplateYoutube';
import TemplateFeatures from '@/components/templates/TemplateFeatures';
import TemplateConfiguration from '@/components/templates/TemplateConfiguration';
import TemplateRelated from '@/components/templates/TemplateRelated';
import TemplateFeaturesAnimation from '@/components/templates/templatefeaturesanimation/TemplateFeaturesAnimation';
import TemplateFeaturesAnimation from '@/components/templates/templateFeaturesAnimation';
import TemplateSeparator from '@/components/templates/TemplateSeparator';
import TemplateHero from '@/components/templates/templateHero/TemplateHero';
import VeronaLogo from './VeronaLogo';
Expand Down

0 comments on commit e1b0d78

Please sign in to comment.