Skip to content

Commit

Permalink
fix patchUrlMappings code example
Browse files Browse the repository at this point in the history
  • Loading branch information
advaith1 committed Apr 18, 2024
1 parent df7d365 commit e8003db
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/activities/Development_Guides.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -674,13 +674,12 @@ See the example below:


```javascript
import {DiscordSDK} from '@discord/embedded-app-sdk';
const discordSdk = new DiscordSDK(YOUR_APP_ID);
import {patchUrlMappings} from '@discord/embedded-app-sdk';
const isProd = process.env.NODE_ENV === 'production'; // Actual dev/prod env check may vary for you

async function setupApp() {
if (isProd) {
discordSdk.patchUrlMappings([{prefix: '/foo', target: 'foo.com'}]);
patchUrlMappings([{prefix: '/foo', target: 'foo.com'}]);
}
// start app initialization after this....
}
Expand Down

0 comments on commit e8003db

Please sign in to comment.