mirror of
https://github.com/misode/misode.github.io.git
synced 2026-05-02 13:42:55 +00:00
Make generator not found errors not reportable
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
import { getCurrentUrl, route } from 'preact-router'
|
import { getCurrentUrl, route } from 'preact-router'
|
||||||
import { useMemo } from 'preact/hooks'
|
import { useMemo } from 'preact/hooks'
|
||||||
import config from '../Config.js'
|
|
||||||
import { getGenerator } from '../Utils.js'
|
|
||||||
import { SchemaGenerator } from '../components/generator/SchemaGenerator.jsx'
|
import { SchemaGenerator } from '../components/generator/SchemaGenerator.jsx'
|
||||||
import { ErrorPanel, Octicon } from '../components/index.js'
|
import { ErrorPanel, Octicon } from '../components/index.js'
|
||||||
|
import config from '../Config.js'
|
||||||
import { useLocale, useTitle, useVersion } from '../contexts/index.js'
|
import { useLocale, useTitle, useVersion } from '../contexts/index.js'
|
||||||
import type { VersionId } from '../services/index.js'
|
import type { VersionId } from '../services/index.js'
|
||||||
import { checkVersion } from '../services/index.js'
|
import { checkVersion } from '../services/index.js'
|
||||||
|
import { getGenerator } from '../Utils.js'
|
||||||
|
|
||||||
export const SHARE_KEY = 'share'
|
export const SHARE_KEY = 'share'
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ export function Generator({}: Props) {
|
|||||||
|
|
||||||
const gen = getGenerator(getCurrentUrl())
|
const gen = getGenerator(getCurrentUrl())
|
||||||
if (!gen) {
|
if (!gen) {
|
||||||
return <main><ErrorPanel error={locale('generator.not_found', getCurrentUrl())} /></main>
|
return <main><ErrorPanel error={locale('generator.not_found', getCurrentUrl())} reportable={false} /></main>
|
||||||
}
|
}
|
||||||
|
|
||||||
const allowedVersions = useMemo(() => {
|
const allowedVersions = useMemo(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user