Skip to content

Conversation

@oritb488
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@Shira-Abrams Shira-Abrams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fiex the commen and inform me please when you finish

const { i18n } = useTranslation();

useEffect(()=>{
const user={
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retreive user from redux




const Messages = ({ currentUser, onUpdate }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retrive current user from redux

Object.entries(messagesData).forEach(([key, value]) => {
formData.append(key, value);
});

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did you send the data to the server ?

@oritb488 oritb488 requested a review from moriya2004 August 12, 2024 11:01
@oritb488 oritb488 requested review from Shira-Abrams and removed request for moriya2004 August 14, 2024 08:29
REACT_APP_BASE_URL='http://localhost:3000'
REACT_APP_SECRET_CODE_CAPVAL='6Ld5uBoqAAAAAKwPXqo5eanm9ZFSuOoBBSdl00pE'
REACT_APP_SERVER_URL='http://localhost:5000'
REACT_APP_SERVER_URL='http://localhost:3000'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you cant use port 3000 both for server url & base url, please return the port 5000

<RouterProvider router={router} />
<SnackbarProvider maxSnack={3}>
<Provider store={store}>
<RouterProvider router={router} />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you delete the router?

import axios from 'axios';

const url = process.env.REACT_APP_SERVER_URL;
const url = process.env.REACT_APP_BASE_URL;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you change it?

const [sendNotificationTime, setSendNotificationTime] = useState(notificationTime);
const [displayIncomeMessages, setDisplayIncomeMessages] = useState(showIncomeMessages);
const [displayBrowsingTimeLimit, setDisplayBrowsingTimeLimit] = useState(showBrowsingTimeLimit);
const { t } = useTranslation();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename t to meaningful name

displayBrowsingTimeLimit:showBrowsingTimeLimit, emailFrequency: initialEmailFrequency, } = currentUser.preference;
const [emailFrequency, setEmailFrequency] = useState(initialEmailFrequency);
const [ringtoneFile, setRingtoneFile] = useState(null);
const url = process.env.REACT_APP_BASE_URL;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you have to save it in variable?

@@ -62,8 +64,10 @@ export const deletePreference = async (req, res, next) => {
if (!PreferenceForDelet)
return next({ message: 'Preferencs not found !!' })
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add status code

export const getAllProfiles = async (req, res) => {
try {
const profiles = await Profiles.find().populate('limitedWebsites.websiteId blockedSites').select('-__v');
const profiles = await Profiles.find().populate('limitedWebsites.websiteId').select('-__v');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change related to your task?

if(!mongoose.Types.ObjectId.isValid(id))
return next({message:'id is not valid'})
if (!mongoose.Types.ObjectId.isValid(id))
return next({ message: 'id is not valid' });
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add status codes to all next usages

req.body.profileImage = req.file.originalname;


// שינוי פורמט התאריך, נניח אם יש שדה בשם date
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace to English comment, or remove


// שינוי פורמט התאריך, נניח אם יש שדה בשם date
if (req.body.date) {
req.body.date = moment(req.body.date).format('yyyy-MM-dd'); // החלף בפורמט הרצוי
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace with English comment, or remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants