We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7 events are added for each new city.
The dynamic image URL is created based on the following format:
`https://source.unsplash.com/random/900x700/?${slug}`
Don't forget to add the external URL in the next.config.js
next.config.js
{ protocol: "https", hostname: "source.unsplash.com", port: "", pathname: "/**", },
Additional helpful utilities:
This function is used to decode the URI component. For example, if the city is "Los%20Angeles", it will be decoded to "Los Angeles".
export function decodeURIComp(s: string): string { return decodeURIComponent(s); }
This function is used to capitalize the first letter of each word in a string. For example, if the input is "new york", the output will be "New York".
export function capitalize(s: string): string { return s.replace(/(^\w{1})|(\s+\w{1})/g, (letter) => letter.toUpperCase()); }
Can be called as follows:
const cityName = capitalize(decodeURIComp(params.city));
The text was updated successfully, but these errors were encountered:
Looks good on first sight Dipesh, thanks! Will have to take a look at it again later
Sorry, something went wrong.
No branches or pull requests
Seed File: seed.ts
Cities Included
7 events are added for each new city.
The dynamic image URL is created based on the following format:
`https://source.unsplash.com/random/900x700/?${slug}`
Don't forget to add the external URL in the
next.config.js
Additional helpful utilities:
This function is used to decode the URI component. For example, if the city is "Los%20Angeles", it will be decoded to "Los Angeles".
This function is used to capitalize the first letter of each word in a string. For example, if the input is "new york", the output will be "New York".
Can be called as follows:
The text was updated successfully, but these errors were encountered: