5180 fichiers 38.5 Mo 0 téléchargements 604 vues mis à jour il y a 12 heures ui
nitro-v36-with-renderer-v36 / src / components / room / widgets / avatar-info / infostand / InfoStandWidgetUserTagsView.tsx
InfoStandWidgetUserTagsView.tsx 1.4 Ko Télécharger le fichier
import { CreateLinkEvent } from '@octane/renderer';
import { FC } from 'react';
import { Flex, Text } from '../../../../../common';
import { BaseButton } from '../../../../../common/BaseButton';
import { NativeTextTree } from '../../../../../common/native-text/NativeTextTree';

interface InfoStandWidgetUserTagsViewProps {
    tags: string[];
}

const processAction = (tag: string) => {
    CreateLinkEvent(`navigator/tag/${tag}`);
};

export const InfoStandWidgetUserTagsView: FC<InfoStandWidgetUserTagsViewProps> = (props) => {
    const { tags = null } = props;

    if (!tags || !tags.length) return null;

    return (
        <NativeTextTree>
            <>
                <hr className="m-0" />
                <Flex className="flex-tags">
                    {tags &&
                        tags.length > 0 &&
                        tags.map((tag, index) => (
                            <Text
                                component={BaseButton}
                                type="button"
                                key={index}
                                className="text-tags"
                                variant="white"
                                onClick={(event) => processAction(tag)}
                            >
                                {tag}
                            </Text>
                        ))}
                </Flex>
            </>
        </NativeTextTree>
    );
};
15Sujets
1Dépôts
20Membres
4En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser