refactor: mostly finish settings transition

This commit is contained in:
David Ralph
2024-06-15 11:35:29 +01:00
parent b2a1869089
commit 9f27af17fb
20 changed files with 37 additions and 333 deletions

View File

@@ -6,7 +6,6 @@ import { SiGithubsponsors, SiOpencollective, SiX } from 'react-icons/si';
import { BiDonateHeart } from 'react-icons/bi';
import { Tooltip, Button } from 'components/Elements';
import other_contributors from 'utils/data/other_contributors.json';
class About extends PureComponent {
constructor() {
@@ -14,7 +13,6 @@ class About extends PureComponent {
this.state = {
contributors: [],
sponsors: [],
other_contributors: [],
photographers: [],
curators: [],
update: variables.getMessage('modals.main.settings.sections.about.version.checking_update'),
@@ -106,7 +104,6 @@ class About extends PureComponent {
contributors: contributors.filter((contributor) => !contributor.login.includes('bot')),
sponsors,
update,
other_contributors,
photographers,
curators,
loading: null,
@@ -301,16 +298,6 @@ class About extends PureComponent {
</a>
</Tooltip>
))}
{
// for those who contributed without opening a pull request
this.state.other_contributors.map(({ login, avatar_url }) => (
<Tooltip title={login} key={login}>
<a href={'https://github.com/' + login} target="_blank" rel="noopener noreferrer">
<img draggable={false} src={avatar_url + '&s=128'} alt={login}></img>
</a>
</Tooltip>
))
}
</div>
</div>

View File

@@ -2,7 +2,8 @@ import { Suspense, lazy, memo } from 'react';
const Analog = lazy(() => import('react-clock'));
function ClockSkeleton() {
if (localStorage.getItem('timeType') === 'analogue') {
const timeType = localStorage.getItem('timeType');
if (timeType === 'analogue') {
return (
<Suspense fallback={<></>}>
<div className="clockBackground">
@@ -14,9 +15,9 @@ function ClockSkeleton() {
</div>
</Suspense>
);
} else if (localStorage.getItem('timeType') === 'percentageComplete') {
} else if (timeType === 'percentageComplete') {
return <span className="vertical-clock clock-container clockSkeleton">68%</span>;
} else if (localStorage.getItem('timeType') === 'verticalClock') {
} else if (timeType === 'verticalClock') {
return (
<span className="vertical-clock clock-container" style={{ fontSize: '30px' }}>
<div className="hour">10</div>