Closed deafwired closed 9 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
terminal-portfolio | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 1, 2023 10:10pm |
Nice work.
It'd be great if you can take care of two more things-
clear
command, if we press the arrow up key we are supposed to see the previous command(s). But nothing is shown. Let me know if this makes sense, otherwise, I'll create a video.
Thanks for the awesome work.
from what i can see, when you clear, it sets the history to an empty array, should this not happen?
else if (command === "clear") {
setHistory([]);
)
I think we need to rewrite the code such that-
When we run clear
it clears the UI. Maybe we can keep two states. One that handles the elements that we'll display. Another state can just preserve the command history. We can use the later to navigate. These are just my thoughts. Might be there is a better approach?
If you want to take up the rewrite task that'd be awesome. If not, it's perfectly fine as you have done the main implementation.
Do let me know your thoughts.
Thanks
I added the clearing when you press downarrow, but tbh i don't know typescript that well and have been relying on javascript knowlege.
@deafwired cool. You are a brilliant guy!
Thanks very much for the contribution.
i also formatted with prettier