mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-18 03:06:16 +01:00
update makefile and other tiny refactoring
- remove goccy/json dep - add explicit types in gpu.go
This commit is contained in:
@@ -11,7 +11,7 @@ const routes = {
|
||||
* The base path of the application.
|
||||
* This is used to prepend the base path to all routes.
|
||||
*/
|
||||
export const basePath = globalThis.BESZEL.BASE_PATH || ""
|
||||
export const basePath = BESZEL?.BASE_PATH || ""
|
||||
|
||||
/**
|
||||
* Prepends the base path to the given path.
|
||||
@@ -41,5 +41,12 @@ function onClick(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {
|
||||
}
|
||||
|
||||
export const Link = (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => {
|
||||
return <a onClick={onClick} {...props}></a>
|
||||
let clickFn = onClick
|
||||
if (props.onClick) {
|
||||
clickFn = (e) => {
|
||||
onClick(e)
|
||||
props.onClick?.(e)
|
||||
}
|
||||
}
|
||||
return <a {...props} onClick={clickFn}></a>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user