today I added a artificial delay, so the terminal feels more natural. I also added an indicator (the one with the X in the image) which toook waaaaaay too long. It was very hard to get it to show the X or tick corresponding to the response, because I tried to do it with ifs, so I needed to match every case, but then I realized, that I can use the bool ? true : false method, which made it alot easier. I also struggled to bring it to the right, because I tried to use flex and justify-content: space-between. Normally this will work very well, but I had more than 2 divs, or in my case spans inside the container, so it stretched the whole thing out and that wasnt great. In the end I decided to hard code that with position absolute and right 20px (body has 20px padding). Another funny error was the inline style. In NextJS u handle style like this <span style={{ position: "absolute", right: "20px" }}>, but u need to change to normal html when using the .innerHTML function, so <span style="position: absolute, right: 20px">. This confused me quite a while. But ya, here we are.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.