Skip to content

Commit 5f3a078

Browse files
committed
Fix lintint issues
1 parent 6954fe3 commit 5f3a078

File tree

4 files changed

+47
-11
lines changed

4 files changed

+47
-11
lines changed

frontend/nginx/nginx.conf

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
user nginx;
2+
3+
worker_processes auto;
4+
5+
events { worker_connections 1024; }
6+
7+
http {
8+
server {
9+
server_tokens off;
10+
11+
listen 8080;
12+
root /usr/share/nginx/html;
13+
include /etc/nginx/mime.types;
14+
15+
location / {
16+
try_files $uri $uri/ /index.html;
17+
}
18+
19+
gzip on;
20+
gzip_vary on;
21+
gzip_http_version 1.0;
22+
gzip_comp_level 5;
23+
gzip_types
24+
application/atom+xml
25+
application/javascript
26+
application/json
27+
application/rss+xml
28+
application/vnd.ms-fontobject
29+
application/x-font-ttf
30+
application/x-web-app-manifest+json
31+
application/xhtml+xml
32+
application/xml
33+
font/opentype
34+
image/svg+xml
35+
image/x-icon
36+
text/css
37+
text/plain
38+
text/x-component;
39+
gzip_proxied no-cache no-store private expired auth;
40+
gzip_min_length 256;
41+
gunzip on;
42+
}
43+
}

frontend/src/pages/cafes/CafeModal.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ import {
44
Modal,
55
Box,
66
Typography,
7-
FormControl,
87
TextField,
9-
FormHelperText,
108
Button,
11-
Backdrop,
12-
CircularProgress,
139
Dialog,
1410
DialogActions,
1511
DialogContent,
@@ -98,7 +94,7 @@ const CafeModal: React.FC<CafeModalProps> = ({
9894
onSubmit(
9995
{
10096
...data,
101-
employees: initialData?.employees || [], // Keep the existing employees or use an empty array
97+
employees: initialData?.employees || [],
10298
} as CafeDataMutationType,
10399
initialData?.id
104100
);

frontend/src/pages/cafes/Cafes.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ import {
2626
TableContainer,
2727
TableHead,
2828
TableRow,
29-
Paper,
3029
Avatar,
3130
TableSortLabel,
3231
} from '@mui/material';
33-
import { omit, sortBy } from 'lodash';
34-
import React, { useMemo, useState } from 'react';
32+
import { sortBy } from 'lodash';
33+
import { useMemo, useState } from 'react';
3534
import { FiTrash2, FiEdit } from 'react-icons/fi';
3635
import CafeModal from './CafeModal';
3736

@@ -76,7 +75,7 @@ const Cafes = () => {
7675
const handleUpdateCafe = (body: CafeDataMutationType, id?: string) => {
7776
if (!id) return;
7877
return updateCafe(
79-
{ id, data: { ...body, employees: body.employees.map((emp) => emp.id) } },
78+
{ id, data: { ...body, employees: body?.employees?.map((emp) => emp.id) as any } },
8079
{
8180
onSuccess: () => {
8281
void refetch();

frontend/src/pages/employees/EmployeeModal.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import {
88
TextField,
99
FormHelperText,
1010
Button,
11-
Backdrop,
12-
CircularProgress,
1311
Dialog,
1412
DialogActions,
1513
DialogContent,

0 commit comments

Comments
 (0)