<commit_before>import React from 'react'
import { Box, Grid, Typography, Card, CardContent } from '@material-ui/core'
import { Edit, Delete } from '@material-ui/icons'
import Flight from './Flight'
import Hotel from './Hotel'

export default function TravelObject(props) {
    let content = null;
    switch (props.data.type) {
        case 'event':
            content = <Typography variant="h4" gutterBottom>Event!</Typography>
            break;
        case 'flight':
            content = <Flight {...props.data} />
            break;
        case 'hotel':
            content = <Hotel {...props.data}/>
            break;
        default:
            return null;
    }

    return (
        <Card>
            <CardContent>
                <Grid container direction="row">
                    <Grid item xs>
                        <Box mr={10} width="100%" height="100%">
                            {content}
                        </Box>
                    </Grid>
                    <Grid item>
                        <Grid container direction="column">
                            <Grid item>
                                <Edit
                                    onClick={() => props.onEditItem(props.data.id)}
                                />
                            </Grid>
                            <Grid item>
                                <Delete
                                    onClick={() => props.onRemoveItem(props.data.id)}
                                /><commit_msg>Wrap edit and delete buttons in IconButton component<commit_after>import React from 'react'
import { Box, Grid, Typography, Card, CardContent, IconButton } from '@material-ui/core'
import { Edit, Delete } from '@material-ui/icons'
import Flight from './Flight'
import Hotel from './Hotel'

export default function TravelObject(props) {
    let content = null;
    switch (props.data.type) {
        case 'event':
            content = <Typography variant="h4" gutterBottom>Event!</Typography>
            break;
        case 'flight':
            content = <Flight {...props.data} />
            break;
        case 'hotel':
            content = <Hotel {...props.data} />
            break;
        default:
            return null;
    }

    return (
        <Card>
            <CardContent>
                <Grid container direction="row">
                    <Grid item xs>
                        <Box mr={10} width="100%" height="100%">
                            {content}
                        </Box>
                    </Grid>
                    <Grid item>
                        <Grid container direction="column">
                            <Grid item>
                                <IconButton aria-label="edit">
                                    <Edit
                                        onClick={() => props.onEditItem(props.data.id)}
                                    />
                                </IconButton>
                            </Grid>
                            <Grid item>
                                <IconButton arial-label="delete">
                                    <Delete
                                        onClick={() => props.onRemoveItem(props.data.id)}
                                    />
                                </IconButton>
{'fraction_non_alphanumeric': 0.1043609022556391, 'fraction_numerical': 0.005413533834586466, 'mean_word_length': 0.9892344497607656, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2392330', 'n_tokens_mistral': 781, 'n_tokens_neox': 740, 'n_words': 190}