Skip to content

Commit

Permalink
訪れたことのある空港を表示
Browse files Browse the repository at this point in the history
  • Loading branch information
hideo54 committed Aug 17, 2023
1 parent 13dc3f9 commit e27a3a6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pages/visits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,15 @@ const App: NextPage = () => {
maxCount={47}
/>
</section>
<section>
<h2>訪れたことのある空港</h2>
<p>飛行機だいすきなので。</p>
<ul>
{swarmDataJson.visitedAirports.map(airportName =>
<li key={airportName}>{airportName}</li>
)}
</ul>
</section>
<section>
<h2>訪れたことのある国</h2>
<ul>
Expand Down
10 changes: 10 additions & 0 deletions scripts/getCheckins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ const getCheckinData = async () => {
keikenchi.saga = 5; // 2023年3月、免許合宿でホテルに12泊し、佐賀に親しみを覚えたので、実質居住
keikenchi.kumamoto = 5; // 2023年6月、人工知能学会でホテルに5泊し、熊本に親しみを覚えたので、実質居住

const visitedAirports = Array.from(
new Set(
allCheckins.filter(checkin =>
checkin.venue.categories.map(cat => cat.name).includes('空港')
&& !checkin.venue.name.includes('滑走路')
).map(checkin => checkin.venue.name).reverse() // 訪問順
)
);

const allVisitedCountries = Array.from(
new Set(
allCheckins.map(checkin =>
Expand All @@ -176,6 +185,7 @@ const getCheckinData = async () => {
const checkinData = {
senkyokuVisitCounts,
keikenchi,
visitedAirports,
allVisitedCountries,
allVisitedUSStates,
};
Expand Down

0 comments on commit e27a3a6

Please sign in to comment.