Skip to content

Commit

Permalink
fix: font not loading on safari and update yarn.lock (#23)
Browse files Browse the repository at this point in the history
* chore: update yarn.lock

* fix: fontfaceobserver error on safari

* fix: title font size on landing page
  • Loading branch information
0xArdy authored Feb 15, 2023
1 parent ad9b742 commit eeb10aa
Show file tree
Hide file tree
Showing 4 changed files with 7,269 additions and 7,386 deletions.
2 changes: 1 addition & 1 deletion src/assets/themes/dark/_fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
url(/src/assets/themes/dark/fonts/SharpGrotesk-LightItalic10.otf)
format("opentype");
font-weight: 300;
font-style: italic;
font-style: normal;
font-stretch: normal;
}

Expand Down
7 changes: 4 additions & 3 deletions src/hooks/useFontObserver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ export function useFontObserver() {
});

useEffect(() => {
document.fonts.ready.then(() => {
setReady(true);
});
if (fontLoaded)
document.fonts.ready.then(() => {
setReady(true);
});
}, [fontLoaded]);

return { ready };
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Landing/HeroSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const HeroSection: FC<HeroSectionProps> = ({ ...props }) => {
<StyledHeroSection full backgroundImage="/img/hero/hero-bg.jpg" {...props}>
<LiquidDistortion
text="TO HELP THE WEB3 ECOSYSTEM THRIVE"
fontSize={isMobile ? 50 : 100}
fontSize={isMobile ? 50 : 140}
/>
<HeroDivider src="/img/hero/hero-bg-divider.png" />
</StyledHeroSection>
Expand Down
Loading

0 comments on commit eeb10aa

Please sign in to comment.