This commit is contained in:
Untone 2024-09-19 19:15:05 +03:00
parent 9491f7c504
commit 98f03c2296
4 changed files with 14 additions and 17 deletions

View File

@ -144,12 +144,7 @@
"engines": { "engines": {
"node": ">= 20" "node": ">= 20"
}, },
"trustedDependencies": [ "trustedDependencies": ["@biomejs/biome", "@swc/core", "esbuild", "protobufjs"],
"@biomejs/biome",
"@swc/core",
"esbuild",
"protobufjs"
],
"dependencies": { "dependencies": {
"form-data": "^4.0.0", "form-data": "^4.0.0",
"idb": "^8.0.0", "idb": "^8.0.0",

View File

@ -99,17 +99,17 @@ export const Placeholder = (props: PlaceholderProps) => {
// dufok (^-^') mem for placeholder data without a fallback, it will be `undefined` if not found // dufok (^-^') mem for placeholder data without a fallback, it will be `undefined` if not found
const placeholderData = createMemo(() => { const placeholderData = createMemo(() => {
const dataForType = data[props.type]; const dataForType = data[props.type]
if (!dataForType) { if (!dataForType) {
console.warn(`No placeholder data found for type: ${props.type}`); console.warn(`No placeholder data found for type: ${props.type}`)
} }
return dataForType; return dataForType
// (^-^') No fallback to ensure it is empty when data is missing // (^-^') No fallback to ensure it is empty when data is missing
}); })
// (^-^') Return null if no placeholder data is found // (^-^') Return null if no placeholder data is found
if (!placeholderData()) { if (!placeholderData()) {
return null; return null
} }
return ( return (

View File

@ -133,10 +133,12 @@ export default function AuthorPage(props: RouteSectionProps<AuthorPageProps>) {
) )
return ( return (
<ErrorBoundary fallback={(_err) => { <ErrorBoundary
console.error('ErrorBoundary caught an error', _err) fallback={(_err) => {
return <FourOuFourView /> console.error('ErrorBoundary caught an error', _err)
}}> return <FourOuFourView />
}}
>
<Suspense fallback={<Loading />}> <Suspense fallback={<Loading />}>
<PageLayout <PageLayout
title={title()} title={title()}

View File

@ -28,7 +28,7 @@ export default {
'@': path.resolve('./public'), '@': path.resolve('./public'),
'/icons': path.resolve('./public/icons'), '/icons': path.resolve('./public/icons'),
'/fonts': path.resolve('./public/fonts'), '/fonts': path.resolve('./public/fonts'),
'bootstrap': path.resolve('./node_modules/bootstrap') bootstrap: path.resolve('./node_modules/bootstrap')
} }
}, },
envPrefix: 'PUBLIC_', envPrefix: 'PUBLIC_',