fix: search dropdown select, cleanup functional components

This commit is contained in:
David Ralph
2021-08-28 19:14:22 +01:00
parent 67ab7c8674
commit 21f8b63b80
13 changed files with 52 additions and 59 deletions

View File

@@ -1,7 +1,7 @@
import { Close, Delete } from '@material-ui/icons';
import { setDefaultSettings } from 'modules/helpers/settings';
export default function ResetModal(props) {
export default function ResetModal({ modalClose }) {
const language = window.language.modals.main.settings.sections.advanced.reset_modal;
const reset = () => {
@@ -20,7 +20,7 @@ export default function ResetModal(props) {
<button className='round reset' style={{ marginLeft: 0 }} onClick={() => reset()}>
<Delete/>
</button>
<button className='round import' style={{ marginLeft: '5px' }} onClick={props.modalClose}>
<button className='round import' style={{ marginLeft: '5px' }} onClick={modalClose}>
<Close/>
</button>
</div>

View File

@@ -25,10 +25,8 @@ export default class About extends PureComponent {
try {
versionData = await (await fetch(window.constants.GITHUB_URL + '/repos/' + window.constants.ORG_NAME + '/' + window.constants.REPO_NAME + '/releases', { signal: this.controller.signal })).json();
contributors = await (await fetch(window.constants.GITHUB_URL + '/repos/'+ window.constants.ORG_NAME + '/' + window.constants.REPO_NAME + '/contributors', { signal: this.controller.signal })).json();
sponsors = (await (await fetch(window.constants.SPONSORS_URL + '/list', { signal: this.controller.signal })).json()).sponsors;
photographers = await (await fetch(window.constants.API_URL + '/images/photographers', { signal: this.controller.signal })).json();
} catch (e) {
if (this.controller.signal.aborted === true) {