Skip to content

Commit

Permalink
remove console logs, add basename to BrowserRouter
Browse files Browse the repository at this point in the history
  • Loading branch information
001elijah committed Apr 27, 2023
1 parent 692d763 commit a781043
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/FinanceDataBoard/FinanceDataBoard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const FinanceDataBoard = ({
};

const handleAddBalance = () => {
if (balance) console.log('You already have the balance');
// if (balance) console.log('You already have the balance');

// console.log(typeof sum);

Expand Down
2 changes: 1 addition & 1 deletion src/components/FinanceForm/FinanceForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const FinanceForm = () => {
initialValues: plan || '',
enableReinitialize: true,
onSubmit: values => {
console.log(values);
// console.log(values);
dispatch(
postPlan({
salary: +values.salary,
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import './index.scss';
ReactDOM.createRoot(document.getElementById('root')).render(
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<BrowserRouter>
<BrowserRouter basename='/bc-48-react-project'>
<App />
</BrowserRouter>
</PersistGate>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RegisterPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const RegisterPage = () => {

const handleRegisterUser = (dataForm) => {
dispatch(register(dataForm)).then(result => {
console.log(result)
// console.log(result)
if (!result.error)
navigate('/');
});
Expand Down
4 changes: 2 additions & 2 deletions src/redux/operations/personalPlanOperations.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export const postPlan = createAsyncThunk('personalPlan/post',
async (planData, { getState, rejectWithValue }) => {
const { token } = getState().authorized;
axiosHeaderToken.set(token);
console.log('posting the plan');
// console.log('posting the plan');
try {
const plan = await postPlanAPI(planData);
console.log('posted the plan');
// console.log('posted the plan');
return plan;
} catch (error) {
if (error?.response?.status === 400) Notify.warning('You already have personal plan!');
Expand Down
6 changes: 3 additions & 3 deletions src/services/backendAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const currentUserLogoutApi = () => {
};

export const addBalanceApi = balance => {
console.log('adding balance:', balance);
// console.log('adding balance:', balance);
return axios
.put('/api/user/addBalance', { balance })
.then(({ data: { balance } }) => ({ balance }));
Expand Down Expand Up @@ -267,7 +267,7 @@ export const deleteOneTransactionApi = transactionId => {
};

export const putOneTransactionApi = ({_id, type, comment, sum, category}) => {
console.log('edit')
// console.log('edit')
return axios
.put(`/api/cashflow/${_id}`, { type, category, comment, sum})
.then(({ data: { type, category, comment, sum } }) => ({
Expand Down Expand Up @@ -328,7 +328,7 @@ export const getCustomerSavingsForStatisticApi = ({ year, month }) => {
};

export const addOrChangeImageOfFlatApi = imageFile => {
console.log('api works!');
// console.log('api works!');
return axios
.patch('/api/dynamics/flatImage', imageFile, {
headers: {
Expand Down

0 comments on commit a781043

Please sign in to comment.