react-icons/go#GoBriefcase JavaScript Examples

The following examples show how to use react-icons/go#GoBriefcase. 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: Profile.js    From gitpedia with MIT License 4 votes vote down vote up
Profile = (props) => {
    const {
        avatar_url,
        email,
        html_url,
        login,
        company,
        location,
        blog,
        name,
        public_repos,
        created_at,
    } = props.userData;

    let website = blog;

    if (blog && blog.slice(0, 4) !== "http") {
        website = `http://${blog}`;
    }

    const date = new Date(created_at);
    const joinedDate = date.toDateString().split(" ").slice(1).join(" ");

    // console.log(props.userData);
    return (
        <ProfileSection>
            <UserContainer>
                <UserInfoDiv>
                    <ProfileImgDiv>
                        <img src={avatar_url} width='200px' alt='avatar' />
                    </ProfileImgDiv>
                    <ul>
                        <li>
                            <h1>{name}</h1>
                        </li>
                        <li>
                            <FlexContainer>
                                <div>
                                    {/* If available = true then only show the component */}
                                    <IconSpan available={company} company>
                                        <GoBriefcase /> {company}
                                    </IconSpan>
                                </div>
                                <LocationDiv>
                                    <IconSpan available={location}>
                                        <GoLocation /> {location}
                                    </IconSpan>
                                </LocationDiv>
                            </FlexContainer>
                        </li>
                        <li>
                            <IconSpan available={email}>
                                <GoMail /> {email}
                            </IconSpan>
                        </li>
                        <li>
                            <IconSpan available={website}>
                                <GoGlobe />{" "}
                                <a
                                    href={website}
                                    target='_blank'
                                    rel='noopener noreferrer'>
                                    {blog}
                                </a>
                            </IconSpan>
                        </li>
                        <li>
                            <IconSpan available={html_url}>
                                <a
                                    href={html_url}
                                    target='_blank'
                                    rel='noopener noreferrer'>
                                    <Button>
                                        <GoMarkGithub /> @{login}
                                    </Button>
                                </a>
                            </IconSpan>
                        </li>
                    </ul>
                </UserInfoDiv>
                <DetailList>
                    <ul>
                        <li> <Span><GoCalendar /></Span> Joined github on {joinedDate}</li>
                        <li> <Span><GoPackage /></Span> Since have created {public_repos} projects</li>
                        <LanguageContext.Consumer>
                            {(context) => {
                                const langCount = context.length;
                                return (
                                    <li>
                                        <Span><GoCode /></Span> Using {langCount} different languages
                                    </li>
                                );
                            }}
                        </LanguageContext.Consumer>
                    </ul>
                </DetailList>
            </UserContainer>
        </ProfileSection>
    );
}