@fortawesome/free-solid-svg-icons#faRepeat TypeScript Examples

The following examples show how to use @fortawesome/free-solid-svg-icons#faRepeat. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WarPage.tsx    From apps with MIT License 5 votes vote down vote up
PhaseLink = ({ region, quest, phase }: { region: Region; quest: Quest.Quest; phase: number }) => {
    let description = `Arrow ${phase}`;
    const isRepeatable =
        quest.afterClear === Quest.QuestAfterClearType.REPEAT_LAST && phase === Math.max(...quest.phases);
    if (isRepeatable) description += " (repeatable)";
    const isRepeatableIcon = isRepeatable ? (
        <>
            &nbsp;
            <FontAwesomeIcon icon={faRepeat} />
        </>
    ) : null;
    const hasEnemies = quest.phasesWithEnemies.includes(phase);
    if (hasEnemies) description += " (has enemies data)";
    const hasEnemiesIcon = hasEnemies ? (
        <>
            &nbsp;
            <FontAwesomeIcon icon={faDragon} />
        </>
    ) : null;
    const isStory = quest.phasesNoBattle.includes(phase);
    if (isStory) description += " (has no battle)";
    const isStoryIcon = isStory ? (
        <>
            &nbsp;
            <FontAwesomeIcon icon={faBook} />
        </>
    ) : null;
    return (
        <Link
            title={description}
            key={phase}
            to={`/${region}/quest/${quest.id}/${phase}`}
            style={{ whiteSpace: "nowrap" }}
        >
            {phase}
            {isRepeatableIcon}
            {hasEnemiesIcon}
            {isStoryIcon}
        </Link>
    );
}