Remove unused parts

This commit is contained in:
Michael Fatemi 2021-04-10 22:30:48 -04:00
parent 9f8c0cba66
commit ee4ac5669b
2 changed files with 136 additions and 145 deletions

View File

@ -14,5 +14,3 @@ export async function searchForPlaces(query: string) {
return json; return json;
} }
console.log(searchForPlaces);

View File

@ -1,12 +1,11 @@
import { makeAPIPostCall } from '../api/utils'; import Button from '@material-ui/core/Button';
import Card from '@material-ui/core/Card'; import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent'; import CardContent from '@material-ui/core/CardContent';
import { makeStyles } from '@material-ui/core/styles'; import { makeStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';
import CloudUploadIcon from '@material-ui/icons/CloudUpload'; import CloudUploadIcon from '@material-ui/icons/CloudUpload';
import { useState, useEffect } from 'react'; import { useEffect, useState } from 'react';
import { searchForPlaces } from '../api/google'; import { searchForPlaces } from '../api/google';
import { makeAPIPostCall } from '../api/utils';
const useStyles = makeStyles((theme) => ({ const useStyles = makeStyles((theme) => ({
root: { root: {
maxWidth: 345, maxWidth: 345,
@ -50,146 +49,140 @@ const CreatePool = () => {
style={{ margin: '0.5rem', background: '#F3F5F4' }} style={{ margin: '0.5rem', background: '#F3F5F4' }}
> >
<CardContent> <CardContent>
<Typography gutterBottom variant="h5" component="h2"></Typography> <div className="form-group">
<Typography variant="body2" color="textSecondary" component="p"> <h1 className="form-title">Create Pool</h1>
<div className="form-group"> <label className="" htmlFor="title">
<h1 className="form-title" style={{ fontFamily: 'Impact' }}> Pool Title:{' '}
Create Pool </label>
</h1> <input
<label className="" htmlFor="title"> type="text"
Pool Title:{' '} id="title"
</label> name="title"
<input className="form-control d-flex"
type="text" placeholder="Enter title here..."
id="title" onChange={(event) => setTitle(event.target.value)}
name="title" ></input>
className="form-control d-flex" </div>
placeholder="Enter title here..." <div className="form-group">
onChange={(event) => setTitle(event.target.value)} <label className="" htmlFor="capacity">
></input> Pool Capacity:
</div> </label>
<div className="form-group"> <input
<label className="" htmlFor="capacity"> type="number"
Pool Capacity: id="capacity"
</label> name="capacity"
<input className="form-control d-flex"
type="number" placeholder="0"
id="capacity" onChange={(event) => setCapacity(parseInt(event.target.value))}
name="capacity" ></input>
className="form-control d-flex" </div>
placeholder="0" <div className="form-group">
onChange={(event) => setCapacity(parseInt(event.target.value))} <label className="" htmlFor="pool_start">
></input> Start Time:
</div> </label>
<div className="form-group"> <input
<label className="" htmlFor="pool_start"> type="datetime-local"
Start Time: id="pool_start"
</label> name="pool_start"
<input className="form-control"
type="datetime-local" placeholder=""
id="pool_start" onChange={(event) => setStart(event.target.value)}
name="pool_start" ></input>
className="form-control" </div>
placeholder="" <div className="form-group">
onChange={(event) => setStart(event.target.value)} <label className="" htmlFor="pool_end">
></input> End Time:
</div> </label>
<div className="form-group"> <input
<label className="" htmlFor="pool_end"> type="datetime-local"
End Time: id="pool_end"
</label> name="pool_end"
<input className="form-control"
type="datetime-local" placeholder="Enter text here..."
id="pool_end" onChange={(event) => setEnd(event.target.value)}
name="pool_end" ></input>
className="form-control" </div>
placeholder="Enter text here..." <div className="form-group">
onChange={(event) => setEnd(event.target.value)} <label className="" htmlFor="pool_direction">
></input> Direction:
</div> </label>
<div className="form-group"> <select
<label className="" htmlFor="pool_direction"> id="direction"
Direction: name="direction"
</label> onChange={(event) => setDirection(event.target.value)}
<select
id="direction"
name="direction"
onChange={(event) => setDirection(event.target.value)}
>
<option value="pickup">Picking Up</option>
<option value="dropoff">Dropping Off</option>
</select>
</div>
<div className="form-group">
<label className="" htmlFor="pool_type">
Type:
</label>
<select
id="type"
name="type"
onChange={(event) => setType(event.target.value)}
>
<option value="offer">Offering carpool</option>
<option value="request">Requesting carpooll</option>
</select>
</div>
<div className="form-group">
<label className="" htmlFor="title">
Pool Description:
</label>
<textarea
onChange={(event) => setDescription(event.target.value)}
id="Pool-text"
name="Pool-text"
style={{ height: '200px' }}
className="form-control"
placeholder="Enter text here..."
/>
</div>
<div className="form-group">
<label className="" htmlFor="pool_start">
Group:
</label>
<input
type="text"
className="form-control"
placeholder=""
onChange={(event) => setGroup(event.target.value)}
></input>
</div>
<div className="form-group">
<label className="" htmlFor="location">
Location:
</label>
<input
type="text"
className="form-control"
id="location_input"
></input>
<button
onClick={(e) => {
e.preventDefault();
let input = document.getElementById(
'location_input'
) as HTMLInputElement;
let places = searchForPlaces(input.value);
console.log(places);
}}
>
Search
</button>
</div>
<Button
variant="contained"
color="primary"
className={classes.button}
onClick={onClick}
startIcon={<CloudUploadIcon />}
> >
Submit <option value="pickup">Picking Up</option>
</Button> <option value="dropoff">Dropping Off</option>
<br /> </select>
</Typography> </div>
<div className="form-group">
<label className="" htmlFor="pool_type">
Type:
</label>
<select
id="type"
name="type"
onChange={(event) => setType(event.target.value)}
>
<option value="offer">Offering carpool</option>
<option value="request">Requesting carpooll</option>
</select>
</div>
<div className="form-group">
<label className="" htmlFor="title">
Pool Description:
</label>
<textarea
onChange={(event) => setDescription(event.target.value)}
id="Pool-text"
name="Pool-text"
style={{ height: '200px' }}
className="form-control"
placeholder="Enter text here..."
/>
</div>
<div className="form-group">
<label className="" htmlFor="pool_start">
Group:
</label>
<input
type="text"
className="form-control"
placeholder=""
onChange={(event) => setGroup(event.target.value)}
></input>
</div>
<div className="form-group">
<label className="" htmlFor="location">
Location:
</label>
<input
type="text"
className="form-control"
id="location_input"
></input>
<button
onClick={(e) => {
e.preventDefault();
let input = document.getElementById(
'location_input'
) as HTMLInputElement;
let places = searchForPlaces(input.value);
console.log(places);
}}
>
Search
</button>
</div>
<Button
variant="contained"
color="primary"
className={classes.button}
onClick={onClick}
startIcon={<CloudUploadIcon />}
>
Submit
</Button>
</CardContent> </CardContent>
</Card> </Card>
</div> </div>