Last active
February 17, 2023 05:43
-
-
Save rjpkuyper/b881256c54d6cfbae8fd8ef729b39db6 to your computer and use it in GitHub Desktop.
Simple example to create an URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum Paths { | |
PRODUCTS = '/products' | |
} | |
export const createUrl = (path: Paths) => `${process.env.BASE_URL}${path}` | |
export const productsUrl = createUrl(Paths.PRODUCTS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment