Skip to content

Commit

Permalink
chore: fix invalid build
Browse files Browse the repository at this point in the history
  • Loading branch information
brunotot committed Apr 18, 2024
1 parent 33c2605 commit 4c69a4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 29 deletions.
6 changes: 3 additions & 3 deletions packages/backend/src/config/swagger/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { TODO } from "@org/shared";
import HttpStatus from "http-status";
import swaggerJsdoc from "swagger-jsdoc";

type HttpStatusConverter<T> = {
export type HttpStatusConverter<T> = {
[K in keyof T]: T[K] extends number ? T[K] : never;
};

type HttpStatusMain = Purify<HttpStatusConverter<typeof HttpStatus>>;
export type HttpStatusMain = Purify<HttpStatusConverter<typeof HttpStatus>>;

type HttpStatusNumeric = Values<HttpStatusMain>;
export type HttpStatusNumeric = Values<HttpStatusMain>;

/**
* A type that extracts the values from the properties of an object type `T`.
Expand Down
35 changes: 9 additions & 26 deletions packages/frontend/src/pages/Login/LoginPage.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
Facebook,
GitHub,
Google,
Twitter,
Visibility,
VisibilityOff,
} from "@mui/icons-material";
import { Facebook, GitHub, Google, Twitter, Visibility, VisibilityOff } from "@mui/icons-material";

import {
Box,
Expand Down Expand Up @@ -78,10 +71,9 @@ export function LoginPage() {
// ** Hook
const theme = useTheme();

const handleChange =
(prop: keyof State) => (event: ChangeEvent<HTMLInputElement>) => {
setValues({ ...values, [prop]: event.target.value });
};
const handleChange = (prop: keyof State) => (event: ChangeEvent<HTMLInputElement>) => {
setValues({ ...values, [prop]: event.target.value });
};

const handleClickShowPassword = () => {
setValues({ ...values, showPassword: !values.showPassword });
Expand Down Expand Up @@ -112,21 +104,14 @@ export function LoginPage() {
<Logo />
</Box>
<Box sx={{ mb: 6 }}>
<Typography
variant="h5"
sx={{ fontWeight: 600, marginBottom: 1.5 }}
>
<Typography variant="h5" sx={{ fontWeight: 600, marginBottom: 1.5 }}>
Welcome to {themeConfig.templateName}! 👋🏻
</Typography>
<Typography variant="body2">
Please sign-in to your account and start the adventure
</Typography>
</Box>
<form
noValidate
autoComplete="off"
onSubmit={(e) => e.preventDefault()}
>
<form noValidate autoComplete="off" onSubmit={e => e.preventDefault()}>
<TextField
autoFocus
fullWidth
Expand Down Expand Up @@ -176,7 +161,7 @@ export function LoginPage() {
variant="contained"
sx={{ marginBottom: 7 }}
onClick={() => {
sigUser.value = { id: 1, roles: [Role.USER] };
sigUser.value = { id: 1, roles: [Role.enum.USER] };
navigate(from, { replace: true });
}}
>
Expand Down Expand Up @@ -228,10 +213,8 @@ export function LoginPage() {
>
<GitHub
sx={{
color: (theme) =>
theme.palette.mode === "light"
? "#272727"
: theme.palette.grey[300],
color: theme =>
theme.palette.mode === "light" ? "#272727" : theme.palette.grey[300],
}}
/>
</IconButton>
Expand Down

0 comments on commit 4c69a4c

Please sign in to comment.