mirror of
https://github.com/mue/mue.git
synced 2026-07-18 22:44:08 +02:00
feat: curators list on about page
This commit is contained in:
@@ -16,6 +16,7 @@ class About extends PureComponent {
|
||||
sponsors: [],
|
||||
other_contributors: [],
|
||||
photographers: [],
|
||||
curators: [],
|
||||
update: variables.getMessage('modals.main.settings.sections.about.version.checking_update'),
|
||||
loading: variables.getMessage('modals.main.loading')
|
||||
};
|
||||
@@ -23,7 +24,7 @@ class About extends PureComponent {
|
||||
}
|
||||
|
||||
async getGitHubData() {
|
||||
let contributors, sponsors, photographers, versionData;
|
||||
let contributors, sponsors, photographers, curators, versionData;
|
||||
|
||||
try {
|
||||
versionData = await (
|
||||
@@ -60,6 +61,11 @@ class About extends PureComponent {
|
||||
signal: this.controller.signal,
|
||||
})
|
||||
).json();
|
||||
curators = (await (
|
||||
await fetch(variables.constants.API_URL + '/marketplace/curators', {
|
||||
signal: this.controller.signal,
|
||||
})
|
||||
).json()).data;
|
||||
} catch (e) {
|
||||
if (this.controller.signal.aborted === true) {
|
||||
return;
|
||||
@@ -100,6 +106,7 @@ class About extends PureComponent {
|
||||
update,
|
||||
other_contributors,
|
||||
photographers,
|
||||
curators,
|
||||
loading: null,
|
||||
});
|
||||
}
|
||||
@@ -354,7 +361,6 @@ class About extends PureComponent {
|
||||
flexFlow: 'column',
|
||||
alignItems: 'flex-start',
|
||||
minHeight: '10px',
|
||||
borderBottom: '0',
|
||||
}}
|
||||
>
|
||||
<span className="title">
|
||||
@@ -370,6 +376,27 @@ class About extends PureComponent {
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="settingsRow"
|
||||
style={{
|
||||
flexFlow: 'column',
|
||||
alignItems: 'flex-start',
|
||||
minHeight: '10px',
|
||||
borderBottom: '0',
|
||||
}}
|
||||
>
|
||||
<span className="title">
|
||||
{variables.getMessage('modals.main.settings.sections.about.curators')}
|
||||
</span>
|
||||
{!!this.state.loading ? <p>{this.state.loading}</p> : <></>}
|
||||
<ul>
|
||||
{this.state.curators.map((name) => (
|
||||
<li key={name}>
|
||||
{name}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user