main

mattermost/focalboard

Last updated at: 29/12/2023 09:42

guestBadge.tsx

TLDR

This file contains the code for the GuestBadge component, which displays a badge indicating that the user is a guest.

Methods (if applicable)

None

Classes (if applicable)

None

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import React, {memo} from 'react'
import {FormattedMessage} from 'react-intl'

import './guestBadge.scss'

type Props = {
    show?: boolean
}

const GuestBadge = (props: Props) => {
    if (!props.show) {
        return null
    }
    return (
        <div className='GuestBadge'>
            <div className='GuestBadge__box'>
                <FormattedMessage
                    id='badge.guest'
                    defaultMessage='Guest'
                />
            </div>
        </div>
    )
}

export default memo(GuestBadge)