Skip to content

Commit

Permalink
[website] Fix production issues (mui#28384)
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp authored Sep 16, 2021
1 parent 85598e7 commit 05ac838
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
26 changes: 14 additions & 12 deletions docs/src/components/footer/EmailSubscribe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import FormLabel from '@mui/material/FormLabel';
import FormHelperText from '@mui/material/FormHelperText';
import InputBase from '@mui/material/InputBase';
import CheckCircleRoundedIcon from '@mui/icons-material/CheckCircleRounded';
import getBuildContextVars from 'docs/src/getBuildContextVars';

const Form = styled('form')({});

Expand All @@ -32,18 +31,21 @@ export default function EmailSubscribe({ sx }: { sx?: SxProps<Theme> }) {
event.preventDefault();
setForm((current) => ({ ...current, status: 'loading' }));
try {
await fetch(getBuildContextVars().EMAIL_SUBSCRIBE_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
await fetch(
'https://f0433e60.sibforms.com/serve/MUIEAHEhgYhMvLAw0tycwk1BQaIB-q0akob3JdtDBmHLhSR-jLheJ2T44LFCz27alz9wq_Nkdz9EK7Y8hzM1vQND9kTFyKkkhTIbEzXaH5d-_S9Fw4PXS1zAK8efPY6nhCdoAop1SKTeZ_GAPW5S0xBFQRLUGYbvvRgE4Q2Ki_f1KjbiCqaRuzmj_I3SD1r0CoR4INmK3CLtF4kF',
{
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
mode: 'no-cors',
body: searchParams({
EMAIL: form.email,
email_address_check: '',
locale: 'en',
}),
},
mode: 'no-cors',
body: searchParams({
EMAIL: form.email,
email_address_check: '',
locale: 'en',
}),
});
);
setForm((current) => ({ ...current, status: 'sent' }));
} catch (error) {
setForm((current) => ({ ...current, status: 'failure' }));
Expand Down
17 changes: 0 additions & 17 deletions docs/src/getBuildContextVars.ts

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/modules/components/AppSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default function AppSearch() {
inputSelector: '#docsearch-input',
algoliaOptions: {
// #major-version-switch - Except changing this line you need to update https://github.com/algolia/docsearch-configs/blob/master/configs/material-ui.json
facetFilters: ['version:next', facetFilterLanguage],
facetFilters: ['version:master', facetFilterLanguage],
},
autocompleteOptions: {
openOnFocus: true,
Expand Down

0 comments on commit 05ac838

Please sign in to comment.