🐛 fix: some regressions

This commit is contained in:
Pauline 2024-08-03 17:34:41 +02:00
parent 7f9c0b4d05
commit 6aca816ec6
No known key found for this signature in database
GPG key ID: 722BB181973296AE
2 changed files with 12 additions and 2 deletions

View file

@ -12,7 +12,7 @@ import ClusterScreenshots from './ClusterScreenshots';
import ClusterSettings from './ClusterSettings';
import ClusterGame from './ClusterGame';
import useClusterContext, { ClusterProvider } from '~ui/hooks/useCluster';
import { supportsMods } from '~utils/helpers';
import { supportsMods } from '~utils';
import { tryResult } from '~ui/hooks/useCommand';
import { bridge } from '~imports';
import PlayerHead from '~ui/components/game/PlayerHead';

View file

@ -1,8 +1,18 @@
import type { VersionType } from '~bindings';
import type { Cluster, Loader, VersionType } from '~bindings';
export * from './PausableTimer';
export * from './sorting';
export function supportsMods(loader?: Cluster | Loader): boolean {
if (loader === undefined)
return false;
if (typeof loader !== 'string')
loader = loader.meta.loader;
return loader !== 'vanilla';
}
export function formatVersionRelease(release: VersionType): string {
const mapping: { [key in VersionType]: string } = {
old_alpha: 'Alpha',