Created
June 22, 2024 17:02
-
-
Save rileybathurst/c8b510b7dc39da523ced25ff18294a28 to your computer and use it in GitHub Desktop.
working out a cleaner string replace
This file contains 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
const adj: { [key: string]: string } = { | |
wedding: 'special day', | |
residential: 'home', | |
commercial: 'business', | |
'commercial-events': 'business', | |
'social_events': 'event', | |
patio: 'patio' | |
}; | |
const adjective = adj[data.strapiService.slug]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment