Skip to content

Prefilled username route#117

Open
BlueBeret wants to merge 3 commits intosallar:masterfrom
BlueBeret:prefilled-username-route
Open

Prefilled username route#117
BlueBeret wants to merge 3 commits intosallar:masterfrom
BlueBeret:prefilled-username-route

Conversation

@BlueBeret
Copy link
Copy Markdown

@BlueBeret BlueBeret commented May 7, 2022

Add dynamic route to prefilled the username and then fetch it.
#55

@vercel
Copy link
Copy Markdown

vercel bot commented May 7, 2022

Someone is attempting to deploy a commit to a Personal Account owned by @sallar on Vercel.

@sallar first needs to authorize it.

Copy link
Copy Markdown
Owner

@sallar sallar left a comment

Choose a reason for hiding this comment

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

package-lock.json is not needed, this project uses yarn

Comment thread src/pages/index.js
setError(null);
setData(null);

fetchData(cleanUsername(props.username))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This part is a duplicate of existing functionality. Is it possible for you to use the same code for both? (like extracting the fetch into its own function)

Comment thread src/pages/[username].js

useEffect(() => {
if (route.split("/")[1] !== '[username]') {
console.log(route.split("/")[1])
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unnecessary log

Comment thread src/pages/[username].js Outdated
Co-authored-by: Tanvir Islam Streame <engr.tanvir.islam.1@gmail.com>
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.

3 participants