Skip to content

Commit

Permalink
remove console logs (#21)
Browse files Browse the repository at this point in the history
* remove console logs
  • Loading branch information
Dami-18 authored Jul 12, 2024
1 parent 2ff88b9 commit 8f1c775
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 26 deletions.
43 changes: 20 additions & 23 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
# React + TypeScript + Vite
# Frontend

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
## Get Your Freaking Electives

Currently, two official plugins are available:
GYFE simplifies course selection by providing available depth and breadth electives for the upcoming semester.

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
### Running locally

## Expanding the ESLint configuration
First install [nodejs](https://nodejs.org/en/download/package-manager). Then install `pnpm` by running `npm install -g pnpm`.

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
Then follow the given steps to launch the frontend:

- Configure the top-level `parserOptions` property like this:
1. Clone the repository
```sh
git clone https://github.com/metakgp/gyfe.git
```
2. Install dependencies
```sh
cd gyfe/frontend
pnpm install
```
3. Start the server
```sh
pnpm dev
```

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
This setup will launch the frontend. To start backend server also, please follow the instructions [here](https://github.com/metakgp/gyfe/blob/main/README.md)
1 change: 0 additions & 1 deletion frontend/src/components/Electives.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const Electives: React.FC = () => {

if (!res.ok) {
toast.error("Some Error Occured. Please Try Again.");
console.log(res.statusText);
return;
}

Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/MultiForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import ErrorPage from "./ErrorPage";

const MultiForm: React.FC = () => {
const { currentStep, user } = useAppContext();
console.log({ currentStep, user });
if (currentStep == 2 && user.sessionToken && user.ssoToken)
return <Electives />;
if (currentStep == 1 && user.sessionToken && user.securityQuestion)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/RollForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const RollForm: React.FC = () => {
});

const resData = await res.json();
console.log(resData);

if (!res.ok) {
toast.error(resData.message);
if (res.status == 400) {
Expand Down

0 comments on commit 8f1c775

Please sign in to comment.