Skip to content

Commit

Permalink
Merge pull request #46 from NUTFes/fix/imaimai/parking-card
Browse files Browse the repository at this point in the history
駐車場情報の変更
  • Loading branch information
nose221834 authored Sep 13, 2023
2 parents 37c8616 + 21f34ab commit a32949e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
Binary file modified view/public/images/map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 6 additions & 13 deletions view/src/components/common/ParkingCard/ParkingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ const ParkingCard = ({ name, maxCapacity, currentCapacity, data, dataLimit }: Pa
RecentData &&
RecentData.map((d) =>
new Date(d.time).toLocaleString('ja-JP', {
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
Expand Down Expand Up @@ -84,22 +82,17 @@ const ParkingCard = ({ name, maxCapacity, currentCapacity, data, dataLimit }: Pa
<div className='flex flex-row items-center justify-around'>
<div className='flex flex-col items-center justify-center'>
<p
className={`${
currentCapacity === maxCapacity ? 'text-accent' : 'text-secondary'
} m-3 text-3xl font-bold`}
className={`${currentCapacity < maxCapacity ? 'text-secondary' : 'text-accent'} m-3 text-3xl font-bold`}
>
{currentCapacity}
</p>
<p className='text-sm'>/ {maxCapacity} 台中</p>
</div>
<CheckCircleIcon
fontSize='large'
className={`${currentCapacity === maxCapacity ? 'hidden' : 'block'} text-secondary`}
/>
<CancelIcon
fontSize='large'
className={`${currentCapacity !== maxCapacity ? 'hidden' : 'block'} text-accent`}
/>
{currentCapacity < maxCapacity ? (
<CheckCircleIcon fontSize='large' className='text-secondary' />
) : (
<CancelIcon fontSize='large' className='text-accent' />
)}
</div>
<div className='ml-auto flex flex-col items-end gap-2'>
<p className='text-xs'>クリックで詳細</p>
Expand Down
20 changes: 10 additions & 10 deletions view/src/constants/parkingNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ export const parkings = [
name: 'bionics',
limit: 40,
},
{
nameJP: '電気',
name: 'electronics',
limit: 44,
},
// {
// nameJP: '電気',
// name: 'electronics',
// limit: 44,
// },
{
nameJP: '講義棟西1',
name: 'lecture_west1',
limit: 48,
},
{
nameJP: '講義棟西2',
name: 'lecture_west2',
limit: 44,
},
// {
// nameJP: '講義棟西2',
// name: 'lecture_west2',
// limit: 44,
// },
{
nameJP: '講義棟北',
name: 'lecture_north',
Expand Down

0 comments on commit a32949e

Please sign in to comment.