NegiAkash890 / editor-frontend

Online Code Compiler Frontend Repository
https://editor.akashnegi.in/
17 stars 12 forks source link

Adding feature in dark mode #35

Closed abaran803 closed 2 years ago

abaran803 commented 2 years ago

@NegiAkash890 In dark mode, the title bar is white, which, if dark grey or black will look better. If it is a good change to implement, please assign me.

FireShot Capture 022 - Online Compiler - negiakash890 github io
HarivardhanK commented 2 years ago

If we set it to grey or black it will good @abaran803 Can you assign me this issue?

NegiAkash890 commented 2 years ago

Go ahead @abaran803.

abaran803 commented 2 years ago

When I'm using this project on my local system, it is showing "Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style", a number of times. I'm using windows 10 and vs code IDE. Not getting the solutions mentioned on StackOverflow. image

abaran803 commented 2 years ago

When I'm using this project on my local system, it is showing "Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style", a number of times. I'm using windows 10 and vs code IDE. Not getting the solutions mentioned on StackOverflow. image

This problem is not anymore, I think this was because I did not pull the latest data. But now, when I am putting some js logic in NavBar.js component, it is showing an error: "Line 5:22: Unexpected block statement surrounding arrow body; move the returned value immediately after the => arrow-body-style". But what I know about arrow functional and react, we can put the logic inside {} and return JSX, and if we don't have any logic and there is a single block to return, we omitted the return keyword and {}.

NegiAkash890 commented 2 years ago

Can you share a screenshot so I can have a better idea regarding the same?

abaran803 commented 2 years ago

Can you share a screenshot so I can have a better idea regarding the same? Screenshot (153) Returning a single component without return keyword and without curly braces, working fine

Screenshot (154) Returning the same component with the return keyword and curly braces, not working. I think, to put some js code, we require to use the different blocks of code, one is the logic part and the other is JSX.

Please accept my LinkedIn connection request, named Ayush Baranwal, I want to discuss and learn more about the project and its structure.

NegiAkash890 commented 2 years ago

Hi @abaran803 Just replace

const NavBar = () => {}

with

const NavBar = () => ( );     //Also remove the return statement before div
abaran803 commented 2 years ago

Hi @abaran803 Just replace

const NavBar = () => {}

with

const NavBar = () => ( );     //Also remove the return statement before div

Then how can I write the logic for this component?

NegiAkash890 commented 2 years ago

Hi @abaran803 Just replace

const NavBar = () => {}

with

const NavBar = () => ( );     //Also remove the return statement before div

Then how can I write the logic for this component?

Try this !

const NavBar = () => {
  // logic Here
  const [name, setName] = useState('Akash');
  return (<> </>)
}
abaran803 commented 2 years ago

Again same problem image image

NegiAkash890 commented 2 years ago

Again same problem image image

That's because of ESLINT. If we have some variables that aren't being used then it throws this error. You can read more about this here : https://eslint.org/docs/user-guide/getting-started

For now just add this

 /* eslint-disable */

at the top of the file

NegiAkash890 commented 2 years ago

Closed via #38