diff --git a/root/account/Donation.js b/root/account/Donation.js index aa52956b062..21cdeaa15d8 100644 --- a/root/account/Donation.js +++ b/root/account/Donation.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import UserAccountLayout, { sanitizedAccountLayoutUser, } from '../components/UserAccountLayout.js'; @@ -27,7 +25,7 @@ const Donation = ({ days, nag, user, -}: Props): React.Element => ( +}: Props): React$Element => ( | null => { +): React$Element | null => { const $c = React.useContext(CatalystContext); const user = $c.user; if (!user) { diff --git a/root/account/EmailVerificationStatus.js b/root/account/EmailVerificationStatus.js index b37f9ae8d0c..c871f0c189c 100644 --- a/root/account/EmailVerificationStatus.js +++ b/root/account/EmailVerificationStatus.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import StatusPage from '../components/StatusPage.js'; type Props = { @@ -17,7 +15,7 @@ type Props = { const EmailVerificationStatus = ({ message, -}: Props): React.Element => ( +}: Props): React$Element => (

{nonEmpty(message) diff --git a/root/account/LostPassword.js b/root/account/LostPassword.js index 346165240fa..cc933180ab0 100644 --- a/root/account/LostPassword.js +++ b/root/account/LostPassword.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../layout/index.js'; import FormCsrfToken from '../static/scripts/edit/components/FormCsrfToken.js'; @@ -27,7 +25,7 @@ type Props = { +form: LostPasswordFormT, }; -const LostPassword = (props: Props): React.Element => ( +const LostPassword = (props: Props): React$Element => (

{l('Lost Password')}

diff --git a/root/account/LostPasswordSent.js b/root/account/LostPasswordSent.js index 5c9f61d17ae..5de6c0385f9 100644 --- a/root/account/LostPasswordSent.js +++ b/root/account/LostPasswordSent.js @@ -7,12 +7,10 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import StatusPage from '../components/StatusPage.js'; import {CONTACT_URL} from '../constants.js'; -const LostPasswordSent = (): React.Element => ( +const LostPasswordSent = (): React$Element => (

{exp.l( diff --git a/root/account/LostUsername.js b/root/account/LostUsername.js index 4611e80a0f5..f59d22aa5d9 100644 --- a/root/account/LostUsername.js +++ b/root/account/LostUsername.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../layout/index.js'; import FormCsrfToken from '../static/scripts/edit/components/FormCsrfToken.js'; @@ -25,7 +23,7 @@ type Props = { +form: LostUsernameFormT, }; -const LostUsername = (props: Props): React.Element => ( +const LostUsername = (props: Props): React$Element => (

{l('Lost Username')}

diff --git a/root/account/LostUsernameSent.js b/root/account/LostUsernameSent.js index 0488e3eaaf0..1296f15e432 100644 --- a/root/account/LostUsernameSent.js +++ b/root/account/LostUsernameSent.js @@ -7,12 +7,10 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import StatusPage from '../components/StatusPage.js'; import {CONTACT_URL} from '../constants.js'; -const LostUsernameSent = (): React.Element => ( +const LostUsernameSent = (): React$Element => (

{exp.l( diff --git a/root/account/Preferences.js b/root/account/Preferences.js index d9b38b5a475..56d083f3e14 100644 --- a/root/account/Preferences.js +++ b/root/account/Preferences.js @@ -21,7 +21,7 @@ import PreferencesForm const Preferences = ( props: PreferencesFormPropsT, -): React.Element | null => { +): React$Element | null => { const $c = React.useContext(CatalystContext); const user = $c.user; if (!user) { diff --git a/root/account/PreferencesSaved.js b/root/account/PreferencesSaved.js index 1c14bd86c74..efcfaa24c13 100644 --- a/root/account/PreferencesSaved.js +++ b/root/account/PreferencesSaved.js @@ -12,7 +12,7 @@ import * as React from 'react'; import StatusPage from '../components/StatusPage.js'; import {SanitizedCatalystContext} from '../context.mjs'; -const PreferencesSaved = (): React.Element => { +const PreferencesSaved = (): React$Element => { const $c = React.useContext(SanitizedCatalystContext); return ( diff --git a/root/account/ResetPasswordStatus.js b/root/account/ResetPasswordStatus.js index 7e43977278f..d56e49dcda5 100644 --- a/root/account/ResetPasswordStatus.js +++ b/root/account/ResetPasswordStatus.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import StatusPage from '../components/StatusPage.js'; type Props = { @@ -17,7 +15,7 @@ type Props = { const ResetPasswordStatus = ({ message, -}: Props): React.Element => ( +}: Props): React$Element => (

{message}

diff --git a/root/account/applications/Edit.js b/root/account/applications/Edit.js index b662ae24588..6b04313f292 100644 --- a/root/account/applications/Edit.js +++ b/root/account/applications/Edit.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../../layout/index.js'; import type {ApplicationFormT} from '../../static/scripts/account/components/ApplicationForm.js'; @@ -19,7 +17,7 @@ type Props = { +form: ApplicationFormT, }; -const EditApplication = (props: Props): React.Element => ( +const EditApplication = (props: Props): React$Element => (

{l('Edit Application')}

=> ( +}: Props): React$Element => (

{l('Applications')}

diff --git a/root/account/applications/Register.js b/root/account/applications/Register.js index 6c2af3ad275..425ab5f3006 100644 --- a/root/account/applications/Register.js +++ b/root/account/applications/Register.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../../layout/index.js'; import * as manifest from '../../static/manifest.mjs'; import type {ApplicationFormT} @@ -20,7 +18,7 @@ type Props = { +form: ApplicationFormT, }; -const RegisterApplication = (props: Props): React.Element => ( +const RegisterApplication = (props: Props): React$Element => (

{l('Register Application')}

=> ( +}: Props): React$Element => ( => ( +}: Props): React$Element => ( => ( +}: Props): React$Element => (

{l('Account Created')}

diff --git a/root/account/sso/DiscourseUnconfirmedEmailAddress.js b/root/account/sso/DiscourseUnconfirmedEmailAddress.js index 2bb02b12251..744d41a11ff 100644 --- a/root/account/sso/DiscourseUnconfirmedEmailAddress.js +++ b/root/account/sso/DiscourseUnconfirmedEmailAddress.js @@ -7,11 +7,9 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../../layout/index.js'; -const DiscourseUnconfirmedEmailAddress = (): React.Element => ( +const DiscourseUnconfirmedEmailAddress = (): React$Element => (

{l('Unverified Email Address')}

diff --git a/root/admin/EditBanner.js b/root/admin/EditBanner.js index b19b19d3419..aa164ef91d2 100644 --- a/root/admin/EditBanner.js +++ b/root/admin/EditBanner.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../layout/index.js'; import FormCsrfToken from '../static/scripts/edit/components/FormCsrfToken.js'; @@ -23,7 +21,7 @@ type Props = { }>, }; -const EditBanner = ({form}: Props): React.Element => ( +const EditBanner = ({form}: Props): React$Element => (

{l('Edit banner message')}

diff --git a/root/admin/EmailSearch.js b/root/admin/EmailSearch.js index d5fc3350000..6dfe0f80ae1 100644 --- a/root/admin/EmailSearch.js +++ b/root/admin/EmailSearch.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../layout/index.js'; import expand2react from '../static/scripts/common/i18n/expand2react.js'; import FormRowText from '../static/scripts/edit/components/FormRowText.js'; @@ -26,7 +24,7 @@ type Props = { const EmailSearch = ({ form, results, -}: Props): React.Element => ( +}: Props): React$Element => (

{l('Search users by email')}

diff --git a/root/admin/IpLookup.js b/root/admin/IpLookup.js index fadcfd77605..7779908a0c0 100644 --- a/root/admin/IpLookup.js +++ b/root/admin/IpLookup.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../layout/index.js'; import UserList from './components/UserList.js'; @@ -21,7 +19,7 @@ type Props = { const IpLookup = ({ ipHash, users, -}: Props): React.Element => ( +}: Props): React$Element => (

{l('IP lookup')}

diff --git a/root/admin/LockedUsernameSearch.js b/root/admin/LockedUsernameSearch.js index 5f557bbadde..ac6ecbe661f 100644 --- a/root/admin/LockedUsernameSearch.js +++ b/root/admin/LockedUsernameSearch.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../layout/index.js'; import expand2react from '../static/scripts/common/i18n/expand2react.js'; import bracketed from '../static/scripts/common/utility/bracketed.js'; @@ -30,7 +28,7 @@ const LockedUsernameSearch = ({ form, results, showResults, -}: Props): React.Element => ( +}: Props): React$Element => (

{'Search locked usernames'}

diff --git a/root/admin/LockedUsernameUnlock.js b/root/admin/LockedUsernameUnlock.js index 37a6a7ae2c1..e383609398e 100644 --- a/root/admin/LockedUsernameUnlock.js +++ b/root/admin/LockedUsernameUnlock.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../layout/index.js'; import expand2text from '../static/scripts/common/i18n/expand2text.js'; import FormCsrfToken @@ -23,7 +21,7 @@ type Props = { const LockedUsernameUnlock = ({ form, username, -}: Props): React.Element => ( +}: Props): React$Element => (

{'Unlock username'}

diff --git a/root/admin/PrivilegeSearch.js b/root/admin/PrivilegeSearch.js index fbf0b8f1ded..7dfd42debcd 100644 --- a/root/admin/PrivilegeSearch.js +++ b/root/admin/PrivilegeSearch.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import PaginatedResults from '../components/PaginatedResults.js'; import Layout from '../layout/index.js'; import FormRowCheckbox @@ -42,7 +40,7 @@ const PrivilegeSearch = ({ form, pager, results, -}: Props): React.Element => ( +}: Props): React$Element => (

{l('Search users by privileges')}

diff --git a/root/admin/attributes/Attribute.js b/root/admin/attributes/Attribute.js index e224bbea62e..84d2eefe080 100644 --- a/root/admin/attributes/Attribute.js +++ b/root/admin/attributes/Attribute.js @@ -8,8 +8,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../../layout/index.js'; import {compare} from '../../static/scripts/common/i18n.js'; import expand2react from '../../static/scripts/common/i18n/expand2react.js'; @@ -85,7 +83,7 @@ const renderAttributes = (attribute: AttributeT) => { const Attribute = ({ attributes, model, -}: Props): React.Element => ( +}: Props): React$Element => (

{l('Attributes')} diff --git a/root/admin/attributes/CannotRemoveAttribute.js b/root/admin/attributes/CannotRemoveAttribute.js index 2c6c879d415..52a19dc3b31 100644 --- a/root/admin/attributes/CannotRemoveAttribute.js +++ b/root/admin/attributes/CannotRemoveAttribute.js @@ -7,8 +7,6 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../../layout/index.js'; type Props = { @@ -17,7 +15,7 @@ type Props = { const CannotRemoveAttribute = ({ message, -}: Props): React.Element => ( +}: Props): React$Element => (

{l('Cannot Remove Attribute')}

diff --git a/root/admin/attributes/Index.js b/root/admin/attributes/Index.js index b45dee4955d..b4c377b1530 100644 --- a/root/admin/attributes/Index.js +++ b/root/admin/attributes/Index.js @@ -8,15 +8,13 @@ * later version: http://www.gnu.org/licenses/gpl-2.0.txt */ -import * as React from 'react'; - import Layout from '../../layout/index.js'; type Props = { +models: Array, }; -const Attributes = ({models}: Props): React.Element => ( +const Attributes = ({models}: Props): React$Element => (

{l('Attributes')}