Skip to content

Commit 3736897

Browse files
committed
refactor: consolidate api config, clean up css and icons, and improve semantic layout
1 parent 6e2c985 commit 3736897

File tree

23 files changed

+40
-197
lines changed

23 files changed

+40
-197
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ server/firmware/serverEspReact/secrets.h
2424
# Misc
2525
.DS_Store
2626
._*
27+
.!*
2728
*.log
2829

2930
.idea/

client/src/App.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from "react";
22
import "./i18n";
3-
import "./styles.css";
3+
44
import { Irrigation } from "@/pages/irrigation/irrigation-page-index";
55
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
66
import { DrinksPage } from "@/pages/drinks/drinks-page";
77
import { SideNavBar } from "@/components/Menu/sidenavbar";
8-
import { Box } from "@mui/material";
8+
99
import { CarPage } from "@/pages/car/car-page";
1010
import { RemoteControlProvider } from "@/context/remote-control-context";
1111
import { ConnectivityProvider } from "@/context/connectivity-context";
@@ -15,23 +15,18 @@ export const App: React.FC = () => {
1515
<Router>
1616
<RemoteControlProvider>
1717
<ConnectivityProvider>
18-
<Box sx={{
19-
display: "flex",
20-
flexDirection: { xs: "column", md: "row" },
21-
width: "100%",
22-
minHeight: "100vh"
23-
}}>
18+
<section className="app-layout">
2419
<SideNavBar />
25-
<Box component="main" sx={{ flexGrow: 1, overflowX: "hidden" }}>
20+
<main className="main-content">
2621
<Routes>
2722
<Route path="/" element={<CarPage />} />
2823
<Route path="/irrigation" element={<Irrigation />} />
2924
<Route path="/drinks" element={<DrinksPage />} />
3025
<Route path="/drinks/:tabRouter" element={<DrinksPage />} />
3126
<Route path="*" element={<Irrigation />} />
3227
</Routes>
33-
</Box>
34-
</Box>
28+
</main>
29+
</section>
3530
</ConnectivityProvider>
3631
</RemoteControlProvider>
3732
</Router>

client/src/config/.!18234!._api.config.ts

Whitespace-only changes.

client/src/config/.!18385!._api.config.ts

Whitespace-only changes.

client/src/context/remote-control-context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { createContext, useContext, useEffect, useState, ReactNode } from 'react';
22
import useWebSocket, { ReadyState } from 'react-use-websocket';
3-
import { directionWebRemote } from '../config/api.config';
3+
import { directionWebRemote } from '@/services/api.service';
44

55
interface RemoteState {
66
joystickDirection: string;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,24 @@ body {
135135
.status-pulse {
136136
animation: pulse-glow 2s infinite ease-in-out;
137137
}
138+
139+
/* App Layout */
140+
.app-layout {
141+
display: flex;
142+
flex-direction: column;
143+
width: 100%;
144+
min-height: 100vh;
145+
}
146+
147+
@media (min-width: 900px) {
148+
.app-layout {
149+
flex-direction: row;
150+
}
151+
}
152+
153+
.main-content {
154+
flex-grow: 1;
155+
overflow-x: hidden;
156+
}
157+
158+

client/src/icons/check.svg

Lines changed: 0 additions & 42 deletions
This file was deleted.

client/src/icons/clock.svg

Lines changed: 0 additions & 58 deletions
This file was deleted.

client/src/icons/conf.svg

Lines changed: 0 additions & 27 deletions
This file was deleted.

client/src/icons/waterOff.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)