Skip to content

Commit

Permalink
make sentry default dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsv authored and cgsv committed Mar 10, 2023
1 parent 8e577a4 commit cb01341
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function Header() {

useEffect(() => {
setTranslateEngine(translateEngineStore || "");
}, []);
}, [translateEngineStore]);

const changeLang = () => {
const newLang = i18n.language === "en" ? "zh-CN" : "en";
Expand All @@ -34,7 +34,7 @@ export default function Header() {

const changeEngine = () => {
const newEngine = translateEngine === "google" ? "openai" : "google";
setTranslateEngine(newEngine);
//setTranslateEngine(newEngine);
setTranslateEngineStore(newEngine);
}

Expand Down
4 changes: 3 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ const nextConfig = {
i18n,
}

const SENTRY_DRY_RUN = !(process.env.SENTRY_DRY_RUN === 'false'); // alway dry_run unless explicitly set to false

module.exports = nextConfig

module.exports = withSentryConfig(
module.exports,
{ silent: true },
{ silent: true, dryRun: SENTRY_DRY_RUN },
{ hideSourcemaps: true },
);

1 comment on commit cb01341

@vercel
Copy link

@vercel vercel bot commented on cb01341 Mar 10, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.