Files
star-erp/resources/js/Components/ApplicationLogo.tsx
sky121113 75c634ffe4
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Has been skipped
Koori-ERP-Deploy-System / deploy-production (push) Successful in 44s
fix(inventory): 修復倉庫低庫存警告計算與全站租戶名稱動態化
2026-02-02 11:03:09 +08:00

28 lines
681 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { ImgHTMLAttributes } from 'react';
import { usePage } from '@inertiajs/react';
import { PageProps } from '@/types/global';
export default function ApplicationLogo(props: ImgHTMLAttributes<HTMLImageElement>) {
const { branding } = usePage<PageProps>().props;
// 如果有自訂 Logo優先使用
if (branding?.logo_url) {
return (
<img
{...props}
src={branding.logo_url}
alt="Logo"
/>
);
}
// 預設 Logo
return (
<img
{...props}
src="/logo.png"
alt={`${branding?.short_name || 'Star'} Logo`}
/>
);
}