フォントの設定箇所を変更’
This commit is contained in:
@@ -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={{
|
||||
|
Reference in New Issue
Block a user