import React from 'react'

export default function TravelObject(props) {
    let content = null;
    switch(props.type) {
        case 'event':
            content = <div>Event!</div>;
            break;
        case 'flight':
            content = <div>Flight!</div>
            break;
        case 'hotel':
            content = <div>Hotel!</div>
            break;
        default:
            console.log("Invalid type");
            break;
    }
    return (
        <div>
            {content}
            <button onClick={() => console.log("editing")}>Edit</button>
            <button onClick={() => console.log("deleting")}>Delete</button>
        </div>
    )
    
}
@@ -18,16 +18,46 @@
  'react'
+%0Aimport Flight from './Flight'
 %0A%0Aexport
@@ -277,24 +277,16 @@
  = %3C
-div%3E
 Flight
-!%3C/div
+ /
 %3E%0A  

Replace dummy code for flight case with flight component