Skip to content

Commit

Permalink
feat: 폰트 설정하는 custom hook 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ww8007 committed May 6, 2023
1 parent 0cf1f76 commit 7f37cbc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions common/hooks/useSettingFont.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { useFonts } from 'expo-font';
import React, { useEffect } from 'react';

const useSettingFont = () => {
const [loaded, error] = useFonts({
NanumSquareRound: require('../../assets/fonts/NanumSquareRoundR.ttf'),
NanumSquareBold: require('../../assets/fonts/NanumSquareRoundB.ttf'),
});

useEffect(() => {
if (error) throw error;
}, [error]);

return { loaded };
};

export default useSettingFont;

0 comments on commit 7f37cbc

Please sign in to comment.