Skip to content

Commit

Permalink
⬆️ Bump Next, React and FontAwesome
Browse files Browse the repository at this point in the history
- Next 12 -> 13
- React Dom 17 -> 18
- React FontAwesome 0.1.17 -> 0.2.2
- FontAwesome 6.0.0 -> 6.7.1
- React Bootstrap 2.1.2 -> 2.10.6
- Bootstrap 5.1.3 -> 5.3.3
  • Loading branch information
AndreMiras committed Dec 9, 2024
1 parent 1559225 commit 8960049
Show file tree
Hide file tree
Showing 8 changed files with 421 additions and 332 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
"version": "2024.12.08",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.3.0",
"@fortawesome/free-brands-svg-icons": "^6.0.0",
"@fortawesome/free-regular-svg-icons": "^6.0.0",
"@fortawesome/free-solid-svg-icons": "^6.0.0",
"@fortawesome/react-fontawesome": "^0.1.17",
"@fortawesome/fontawesome-svg-core": "^6.7.1",
"@fortawesome/free-brands-svg-icons": "^6.7.1",
"@fortawesome/free-regular-svg-icons": "^6.7.1",
"@fortawesome/free-solid-svg-icons": "^6.7.1",
"@fortawesome/react-fontawesome": "^0.2.2",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.4.0",
"@types/node": "^22.10.1",
"@types/react": "^18",
"@types/react-dom": "^17.0.11",
"@types/react-dom": "^18",
"assert": "^2.0.0",
"axios": "^0.26.0",
"bootstrap": "5.1.3",
"bootstrap": "^5.3.3",
"edilkamin": "^1.5.0",
"next": "^12",
"next": "13",
"react": "^18",
"react-bootstrap": "^2.1.2",
"react-bootstrap": "^2.10.6",
"react-dom": "^18",
"react-scripts": "5.0.0",
"web-vitals": "^2.1.4"
Expand Down Expand Up @@ -66,7 +66,7 @@
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"eslint": "^9.16.0",
"eslint-config-next": "^15.0.4",
"eslint-config-next": "13",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Login = (): JSX.Element => {
aria-label="Password"
onChange={onPasswordChange}
/>
<Button type="submit" onClick={onLogin}>
<Button variant="primary" type="submit" onClick={onLogin}>
Login
</Button>
</Form>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Logout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Logout = (): JSX.Element => {
const onLogoutClick = (): void => logout();

return (
<Button type="submit" onClick={onLogoutClick}>
<Button variant="primary" type="submit" onClick={onLogoutClick}>
Logout
</Button>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/PowerToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const PowerToggle = ({
>
{togglePowerProps.map(({ value, label, icon }) => (
<ToggleButton
variant="primary"
id={`set-power-${value}`}
key={value}
value={value}
Expand Down
10 changes: 8 additions & 2 deletions src/components/TemperatureAdjuster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const TemperatureAdjuster = ({
loading: boolean;
}) => (
<InputGroup size="lg">
<Button onClick={() => onTemperatureChange(currentTemperature - 0.5)}>
<Button
variant="primary"
onClick={() => onTemperatureChange(currentTemperature - 0.5)}
>
<FontAwesomeIcon icon={"minus"} />
</Button>
<FormControl
Expand All @@ -20,7 +23,10 @@ const TemperatureAdjuster = ({
onChange={(e) => onTemperatureChange(Number(e.target.value))}
disabled={loading}
/>
<Button onClick={() => onTemperatureChange(currentTemperature + 0.5)}>
<Button
variant="primary"
onClick={() => onTemperatureChange(currentTemperature + 0.5)}
>
<FontAwesomeIcon icon={"plus"} />
</Button>
</InputGroup>
Expand Down
5 changes: 4 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import "bootstrap/dist/css/bootstrap.min.css";

import { library } from "@fortawesome/fontawesome-svg-core";
import { fab } from "@fortawesome/free-brands-svg-icons";
import { far } from "@fortawesome/free-regular-svg-icons";
import { fas } from "@fortawesome/free-solid-svg-icons";
Expand All @@ -14,6 +13,10 @@ import Header from "../components/Header";
import { ErrorContextProvider } from "../context/error";
import { TokenContextProvider } from "../context/token";

// workaround SSR issue, refs:
// https://github.com/FortAwesome/Font-Awesome/issues/19348
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { library } = require("@fortawesome/fontawesome-svg-core");
library.add(fab, far, fas);

const MyApp = ({ Component, pageProps }: AppProps): React.ReactElement => (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/fireplace/[mac].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Fireplace: NextPage = () => {
const mac = router.query.mac as string;
const [info, setInfo] = useState<DeviceInfoType | null>(null);
const [powerState, setPowerState] = useState(false);
const [temperature, setTemperature] = useState<number>(20);
const [temperature, setTemperature] = useState<number>(0);
const [loading, setLoading] = useState(true);
const { token } = useContext(TokenContext);
const { addError } = useContext(ErrorContext);
Expand Down
711 changes: 395 additions & 316 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 8960049

Please sign in to comment.