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',
|
'prettier/prettier': 'error',
|
||||||
'react/jsx-sort-props': [
|
'react/jsx-sort-props': [
|
||||||
'error',
|
'error',
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ export const PieCircle = (props: { pieCircleData: PieCircleData }): JSX.Element
|
|||||||
pieCircleData.sort(([[, a]], [[, b]]) => b - a).map(([, item]) => item),
|
pieCircleData.sort(([[, a]], [[, b]]) => b - a).map(([, item]) => item),
|
||||||
pieCircleData.map(([, { backgroundColor }]) => backgroundColor),
|
pieCircleData.map(([, { backgroundColor }]) => backgroundColor),
|
||||||
];
|
];
|
||||||
console.log({ data, legendData });
|
|
||||||
return (
|
return (
|
||||||
<PieCircleContainer>
|
<PieCircleContainer>
|
||||||
<ChartContainer height={height}>
|
<ChartContainer height={height}>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const HeadIndex = (): JSX.Element => (
|
|||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{APP_NAME}</title>
|
<title>{APP_NAME}</title>
|
||||||
<meta property="og:title" content={APP_NAME} key="title" />
|
<meta key="title" content={APP_NAME} property="og:title" />
|
||||||
</Head>
|
</Head>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -24,13 +24,16 @@ export const SpendScreen = (): JSX.Element => {
|
|||||||
trpc.userList
|
trpc.userList
|
||||||
.query()
|
.query()
|
||||||
.then((a) => {
|
.then((a) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(a);
|
console.log(a);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(e);
|
console.log(e);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(e);
|
console.log(e);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ import dotenv from 'dotenv';
|
|||||||
import dbConnection from './db';
|
import dbConnection from './db';
|
||||||
import { publicProcedure, router } from './trpc';
|
import { publicProcedure, router } from './trpc';
|
||||||
import { User, UserSchema } from './schemas';
|
import { User, UserSchema } from './schemas';
|
||||||
dotenv.config();
|
|
||||||
|
|
||||||
console.log(process.env);
|
dotenv.config();
|
||||||
|
|
||||||
const appRouter = router({
|
const appRouter = router({
|
||||||
userById: publicProcedure.input(z.string()).query(async (opts) => {
|
userById: publicProcedure.input(z.string()).query(async (opts) => {
|
||||||
@@ -37,5 +36,6 @@ dbConnection()
|
|||||||
server.listen(3000);
|
server.listen(3000);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(e);
|
console.log(e);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,31 +1,14 @@
|
|||||||
import mongoose from 'mongoose';
|
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> => {
|
export default async (): Promise<void> => {
|
||||||
await mongoose
|
await mongoose
|
||||||
.connect(process.env.MONGO_URI as string)
|
.connect(process.env.MONGO_URI as string)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log('Connected to MongoDB');
|
console.log('Connected to MongoDB');
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.error('Error connecting to MongoDB:', error);
|
console.error('Error connecting to MongoDB:', error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user