mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 11:20:17 -04:00
add Group component
This commit is contained in:
parent
a7b70a31e7
commit
2b201b8c01
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,3 +23,4 @@ yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
||||||
.vscode/
|
.vscode/
|
||||||
|
twitter-state.ts
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import Event from './Event';
|
import Event from './Event';
|
||||||
|
import Group from './Group';
|
||||||
import UIPrimaryTitle from './UIPrimaryTitle';
|
import UIPrimaryTitle from './UIPrimaryTitle';
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
|
@ -15,11 +16,16 @@ export default function App() {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<UIPrimaryTitle>WheelShare</UIPrimaryTitle>
|
<UIPrimaryTitle>WheelShare</UIPrimaryTitle>
|
||||||
<Event
|
<Group
|
||||||
title="TJ Track Regional Meet"
|
events={[
|
||||||
group="TJHSST Track and Field"
|
{
|
||||||
location="Ashburn, Virginia"
|
time: '11:00 AM to 2:45 PM',
|
||||||
time="11:00 AM to 2:45 PM"
|
title: 'TJ Track Regional Meet',
|
||||||
|
group: 'TJHSST Track and Field',
|
||||||
|
location: 'Ashburn, Virginia',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name="TJHSST 2022"
|
||||||
/>
|
/>
|
||||||
<Event
|
<Event
|
||||||
title="End of Year Party"
|
title="End of Year Party"
|
||||||
|
|
|
@ -6,17 +6,14 @@ import UITimeInput from './UITimeInput';
|
||||||
const green = '#60f760';
|
const green = '#60f760';
|
||||||
const lightgrey = '#e0e0e0';
|
const lightgrey = '#e0e0e0';
|
||||||
|
|
||||||
export default function Event({
|
export type IEvent = {
|
||||||
title,
|
|
||||||
group,
|
|
||||||
location,
|
|
||||||
time,
|
|
||||||
}: {
|
|
||||||
title: string;
|
title: string;
|
||||||
group: string;
|
group: string;
|
||||||
location: string;
|
location: string;
|
||||||
time: string;
|
time: string;
|
||||||
}) {
|
};
|
||||||
|
|
||||||
|
export default function Event({ title, group, location, time }: IEvent) {
|
||||||
const [needRideThere, setNeedRideThere] = useState(false);
|
const [needRideThere, setNeedRideThere] = useState(false);
|
||||||
const [needRideBack, setNeedRideBack] = useState(false);
|
const [needRideBack, setNeedRideBack] = useState(false);
|
||||||
const [rideTherePickupPlaceID, setRideTherePickupPlaceID] = useState('');
|
const [rideTherePickupPlaceID, setRideTherePickupPlaceID] = useState('');
|
||||||
|
|
20
src/components/NewUI/Group.tsx
Normal file
20
src/components/NewUI/Group.tsx
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
import Event, { IEvent } from './Event';
|
||||||
|
|
||||||
|
export type IGroup = {
|
||||||
|
events: IEvent[];
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function Group({ events, name }: IGroup) {
|
||||||
|
return (
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
||||||
|
<h1>{name}</h1>
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
||||||
|
{events.map((event) => (
|
||||||
|
<Event {...event} key={event.title} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
//
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user