フォントの設定箇所を変更’

This commit is contained in:
harukin-expo-dev-env
2025-01-05 15:47:31 +00:00
parent d9fb24840a
commit d05ec3f647
3 changed files with 15 additions and 7 deletions

View File

@@ -6,7 +6,6 @@ import { getType } from "../../../lib/eachTrainInfoCoreLib/getType";
import { migrateTrainName } from "../../../lib/eachTrainInfoCoreLib/migrateTrainName";
import { TrainIconStatus } from "./trainIconStatus";
import { TrainViewIcon } from "./trainViewIcon";
import { useFonts } from "expo-font";
type Props = {
data: { trainNum: string; limited: string };
@@ -17,6 +16,7 @@ type Props = {
tailStation: { id: string }[];
navigate: any;
from: string;
fontLoaded: boolean;
};
const textConfig: TextStyle = {
@@ -34,11 +34,8 @@ export const HeaderText: FC<Props> = ({
tailStation,
navigate,
from,
fontLoaded,
}) => {
const [loaded, error] = useFonts({
"JR-Nishi": require("../../../assets/fonts/西日本方向幕ロゴ.otf"),
"Zou": require("../../../assets/fonts/DelaGothicOne-Regular.ttf"),
});
const [typeName, trainName] = useMemo(() => {
if (!data.limited) return "";
const limitedArray = data.limited.split(":");
@@ -73,7 +70,7 @@ export const HeaderText: FC<Props> = ({
alignItems: "center",
}}
>
{loaded ? (
{fontLoaded ? (
<>
<Text
style={{