build: fix build
This commit is contained in:
parent
9b3f996c29
commit
941224c13b
2 changed files with 3 additions and 5 deletions
|
@ -2,7 +2,7 @@ import { getURLAndInit } from 'src/misc/request-helper';
|
|||
import { ClashAPIConfig } from 'src/types';
|
||||
|
||||
type VersionData = {
|
||||
version: string;
|
||||
version?: string;
|
||||
premium?: boolean;
|
||||
};
|
||||
|
||||
|
@ -10,7 +10,7 @@ export async function fetchVersion(
|
|||
endpoint: string,
|
||||
apiConfig: ClashAPIConfig
|
||||
): Promise<VersionData> {
|
||||
let json = { rules: [] };
|
||||
let json = {};
|
||||
try {
|
||||
const { url, init } = getURLAndInit(apiConfig);
|
||||
const res = await fetch(url + endpoint, init);
|
||||
|
|
|
@ -50,12 +50,10 @@ function AboutImpl(props: Props) {
|
|||
suspense: true,
|
||||
}
|
||||
);
|
||||
console.log(version);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ContentHeader title="About" />
|
||||
{version ? (
|
||||
{version && version.version ? (
|
||||
<Version
|
||||
name="Clash"
|
||||
version={version.version}
|
||||
|
|
Loading…
Reference in a new issue