Skip to content

Commit

Permalink
Do it for the build
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesTaylor7 committed Feb 1, 2024
1 parent e5d6c88 commit 768e434
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 15 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@swc/core": "^1.3.107",
"@swc/jest": "^0.2.27",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/CitySearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function CitySearch() {
<>
<div className="flex gap-2 items-center w-full">
<input
placeholder='Search for a city here...'
placeholder="Search for a city here..."
className="input input-bordered w-full"
type="text"
autoFocus
Expand Down Expand Up @@ -95,7 +95,7 @@ function CitySearchResult(props: Props) {
}

if (cityQueryResult.type === 'loading') {
return <span className="loading loading-dots loading-lg" />
return <span className="loading loading-dots loading-lg" />;
}

if (cityQueryResult.type === 'error') {
Expand Down
24 changes: 12 additions & 12 deletions src/components/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ type Option = {

export default function Select(props: Props) {
return (
<select
className="select select-accent"
data-testid={props.testId}
defaultValue={props.default}
onChange={(event) => props.onSelect(event.target.value)}
>
{props.options.map((option) => (
<option className="" key={option.value} value={option.value}>
{option.label}
</option>
))}
</select>
<select
className="select select-accent"
data-testid={props.testId}
defaultValue={props.default}
onChange={(event) => props.onSelect(event.target.value)}
>
{props.options.map((option) => (
<option className="" key={option.value} value={option.value}>
{option.label}
</option>
))}
</select>
);
}
4 changes: 3 additions & 1 deletion src/components/WeatherDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export default function WeatherDashboard() {
return (
<main data-theme="dark" className="flex h-screen w-full justify-center">
<div className="w-4/5 md:w-2/3 flex flex-col gap-5 m-5 items-start">
<header className="w-full text-center bold text-2xl">Weather Dashboard</header>
<header className="w-full text-center bold text-2xl">
Weather Dashboard
</header>
<CitySearch />
<div className="flex flex-wrap gap-2">
{dashboard.cities.map((city, index) => (
Expand Down
79 changes: 79 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,80 @@
dependencies:
"@sinonjs/commons" "^3.0.0"

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.107.tgz#abac4c19816751de1dcbaab456710ca55e580782"
integrity sha512-47tD/5vSXWxPd0j/ZllyQUg4bqalbQTsmqSw0J4dDdS82MWqCAwUErUrAZPRjBkjNQ6Kmrf5rpCWaGTtPw+ngw==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.107.tgz#4c0df233ebf293429cd2f10224d6a870a5cc019e"
integrity sha512-hwiLJ2ulNkBGAh1m1eTfeY1417OAYbRGcb/iGsJ+LuVLvKAhU/itzsl535CvcwAlt2LayeCFfcI8gdeOLeZa9A==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.107.tgz#81004cca4c7554007ea5ac51e276147e958e3e9f"
integrity sha512-I2wzcC0KXqh0OwymCmYwNRgZ9nxX7DWnOOStJXV3pS0uB83TXAkmqd7wvMBuIl9qu4Hfomi9aDM7IlEEn9tumQ==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.107.tgz#c01d75df662067fb7805bfdfa66c2f17f2b3185f"
integrity sha512-HWgnn7JORYlOYnGsdunpSF8A+BCZKPLzLtEUA27/M/ZuANcMZabKL9Zurt7XQXq888uJFAt98Gy+59PU90aHKg==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.107.tgz#5e0c4fe3fcc49a7bb77ffafa680622e53c982e0a"
integrity sha512-vfPF74cWfAm8hyhS8yvYI94ucMHIo8xIYU+oFOW9uvDlGQRgnUf/6DEVbLyt/3yfX5723Ln57U8uiMALbX5Pyw==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.107.tgz#afb4a656a1717170b2c8b76c9b2349b5077630b4"
integrity sha512-uBVNhIg0ip8rH9OnOsCARUFZ3Mq3tbPHxtmWk9uAa5u8jQwGWeBx5+nTHpDOVd3YxKb6+5xDEI/edeeLpha/9g==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.107.tgz#3f9bce2fe13691be39fddc39bba8558fe6308823"
integrity sha512-mvACkUvzSIB12q1H5JtabWATbk3AG+pQgXEN95AmEX2ZA5gbP9+B+mijsg7Sd/3tboHr7ZHLz/q3SHTvdFJrEw==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.107.tgz#5b485e9ce2de6f27ce2fbc1ba8c0b4e98009318d"
integrity sha512-J3P14Ngy/1qtapzbguEH41kY109t6DFxfbK4Ntz9dOWNuVY3o9/RTB841ctnJk0ZHEG+BjfCJjsD2n8H5HcaOA==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.107.tgz#1bbe3ce6784b3e4203bf89443c33411c27389b56"
integrity sha512-ZBUtgyjTHlz8TPJh7kfwwwFma+ktr6OccB1oXC8fMSopD0AxVnQasgun3l3099wIsAB9eEsJDQ/3lDkOLs1gBA==

"@swc/[email protected]":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.107.tgz#c89640b16504ddda1f1faf573a7ed7193dc87485"
integrity sha512-Eyzo2XRqWOxqhE1gk9h7LWmUf4Bp4Xn2Ttb0ayAXFp6YSTxQIThXcT9kipXZqcpxcmDwoq8iWbbf2P8XL743EA==

"@swc/core@^1.3.107":
version "1.3.107"
resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.107.tgz#081697224ec3bffa63c33209d242e4f0b2c49e78"
integrity sha512-zKhqDyFcTsyLIYK1iEmavljZnf4CCor5pF52UzLAz4B6Nu/4GLU+2LQVAf+oRHjusG39PTPjd2AlRT3f3QWfsQ==
dependencies:
"@swc/counter" "^0.1.1"
"@swc/types" "^0.1.5"
optionalDependencies:
"@swc/core-darwin-arm64" "1.3.107"
"@swc/core-darwin-x64" "1.3.107"
"@swc/core-linux-arm-gnueabihf" "1.3.107"
"@swc/core-linux-arm64-gnu" "1.3.107"
"@swc/core-linux-arm64-musl" "1.3.107"
"@swc/core-linux-x64-gnu" "1.3.107"
"@swc/core-linux-x64-musl" "1.3.107"
"@swc/core-win32-arm64-msvc" "1.3.107"
"@swc/core-win32-ia32-msvc" "1.3.107"
"@swc/core-win32-x64-msvc" "1.3.107"

"@swc/counter@^0.1.1":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.2.tgz#bf06d0770e47c6f1102270b744e17b934586985e"
integrity sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==

"@swc/jest@^0.2.27":
version "0.2.27"
resolved "https://registry.yarnpkg.com/@swc/jest/-/jest-0.2.27.tgz#f6cbd0b6f95cf689c3344c63fc379fa680cdbf52"
Expand All @@ -827,6 +901,11 @@
"@jest/create-cache-key-function" "^27.4.2"
jsonc-parser "^3.2.0"

"@swc/types@^0.1.5":
version "0.1.5"
resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.5.tgz#043b731d4f56a79b4897a3de1af35e75d56bc63a"
integrity sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==

"@testing-library/dom@^9.0.0":
version "9.3.1"
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.3.1.tgz#8094f560e9389fb973fe957af41bf766937a9ee9"
Expand Down

0 comments on commit 768e434

Please sign in to comment.