cleanup
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
swcMinify: true,
|
||||
experimental: {
|
||||
serverActions: true,
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = nextConfig
|
||||
|
||||
@@ -3,9 +3,6 @@ import { Metar, getMetars } from "@/js/weather"
|
||||
import Link from "next/link"
|
||||
|
||||
export default async function MetarCard({airports}: {airports: Airport[]}) {
|
||||
// await getMetars(defaultAirports).then((result) => {
|
||||
// setMetars(result);
|
||||
// });
|
||||
const metars = await getMetars(airports);
|
||||
for (let i = 0; i < airports.length; i++) {
|
||||
airports[i].metar = metars[i];
|
||||
@@ -35,7 +32,7 @@ export default async function MetarCard({airports}: {airports: Airport[]}) {
|
||||
<div className="min-w-0 flex-1">
|
||||
<Link href={'#'}>
|
||||
<span className="absolute inset-0" aria-hidden="true" />
|
||||
<p className="text-gray-900 pb-1">{airport.metar?.station_id} - <span>{airport.name}</span></p>
|
||||
<p className="text-gray-900 pb-1">{airport.name} ({airport.metar?.station_id})</p>
|
||||
<p className='text-sm font-medium text-gray-500'>{airport.metar?.raw_text}</p>
|
||||
<div className='mt-2'>
|
||||
<span className={`truncate text-sm text-white ${metarBGColor(airport.metar)} inline-block py-2 px-4 rounded-full`}>{airport.metar?.flight_category}</span>
|
||||
|
||||
@@ -1,31 +1,8 @@
|
||||
// 'use client';
|
||||
|
||||
import { Airport } from '@/js/airport';
|
||||
import React from 'react';
|
||||
import MetarCard from './components/MetarCard';
|
||||
|
||||
export default function Page() {
|
||||
// const [airports, setAirports] = useRecoilState(airportsState);
|
||||
|
||||
// useEffect(() => {
|
||||
// const defaultAirports = [
|
||||
// new Airport('Leesburg Executive Airport', 'KJYO'),
|
||||
// new Airport('Manassas Regional Airpoirt', 'KHEF'),
|
||||
// new Airport('Dulles International Airport', 'KIAD'),
|
||||
// new Airport('Frederick Municipal Airport', 'KFDK'),
|
||||
// new Airport('Eastern West Virginia Regional Airport', 'KMRB'),
|
||||
// new Airport('Winchester Regional Airport', 'KOKV'),
|
||||
// new Airport('Front Royal-Warren County Airport', 'KFRR'),
|
||||
// new Airport('Luray Caverns Airport', 'KLUA'),
|
||||
// new Airport('Shenandoah Valley Airport', 'KSHD'),
|
||||
// new Airport('Charlottesville-Albemarle Airport', 'KCHO'),
|
||||
// new Airport('Culpeper Regional Airport', 'KCJR'),
|
||||
// new Airport('Warrenton-Fauquier Airport', 'KHWY'),
|
||||
// new Airport('Stafford Regional Airport', 'KRMN'),
|
||||
// new Airport('Shannon Airport', 'KEZF'),
|
||||
// ];
|
||||
// setAirports(defaultAirports);
|
||||
// }, []);
|
||||
const defaultAirports = [
|
||||
new Airport('Leesburg Executive Airport', 'KJYO'),
|
||||
new Airport('Manassas Regional Airpoirt', 'KHEF'),
|
||||
|
||||
Reference in New Issue
Block a user