mirror of
https://github.com/FranP-code/spend-ia.git
synced 2025-10-13 00:14:09 +00:00
feat: removed console.logs
This commit is contained in:
@@ -39,6 +39,7 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
],
|
||||
'no-console': 'error',
|
||||
'prettier/prettier': 'error',
|
||||
'react/jsx-sort-props': [
|
||||
'error',
|
||||
|
||||
@@ -15,7 +15,6 @@ export const PieCircle = (props: { pieCircleData: PieCircleData }): JSX.Element
|
||||
pieCircleData.sort(([[, a]], [[, b]]) => b - a).map(([, item]) => item),
|
||||
pieCircleData.map(([, { backgroundColor }]) => backgroundColor),
|
||||
];
|
||||
console.log({ data, legendData });
|
||||
return (
|
||||
<PieCircleContainer>
|
||||
<ChartContainer height={height}>
|
||||
|
||||
@@ -11,7 +11,7 @@ const HeadIndex = (): JSX.Element => (
|
||||
<>
|
||||
<Head>
|
||||
<title>{APP_NAME}</title>
|
||||
<meta property="og:title" content={APP_NAME} key="title" />
|
||||
<meta key="title" content={APP_NAME} property="og:title" />
|
||||
</Head>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -24,13 +24,16 @@ export const SpendScreen = (): JSX.Element => {
|
||||
trpc.userList
|
||||
.query()
|
||||
.then((a) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(a);
|
||||
})
|
||||
.catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(e);
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(e);
|
||||
});
|
||||
}, []);
|
||||
|
||||
@@ -5,9 +5,8 @@ import dotenv from 'dotenv';
|
||||
import dbConnection from './db';
|
||||
import { publicProcedure, router } from './trpc';
|
||||
import { User, UserSchema } from './schemas';
|
||||
dotenv.config();
|
||||
|
||||
console.log(process.env);
|
||||
dotenv.config();
|
||||
|
||||
const appRouter = router({
|
||||
userById: publicProcedure.input(z.string()).query(async (opts) => {
|
||||
@@ -37,5 +36,6 @@ dbConnection()
|
||||
server.listen(3000);
|
||||
})
|
||||
.catch((e) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(e);
|
||||
});
|
||||
|
||||
@@ -1,31 +1,14 @@
|
||||
import mongoose from 'mongoose';
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
// Imaginary database
|
||||
const users: User[] = [];
|
||||
export const db = {
|
||||
user: {
|
||||
create: async (data: { name: string }) => {
|
||||
const user = { id: String(users.length + 1), ...data };
|
||||
users.push(user);
|
||||
return user;
|
||||
},
|
||||
findById: async (id: string) => users.find((user) => user.id === id),
|
||||
findMany: async () => users,
|
||||
},
|
||||
};
|
||||
|
||||
export default async (): Promise<void> => {
|
||||
await mongoose
|
||||
.connect(process.env.MONGO_URI as string)
|
||||
.then(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Connected to MongoDB');
|
||||
})
|
||||
.catch((error) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('Error connecting to MongoDB:', error);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user