File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import { useVersion } from "./hooks/useVersion";
19
19
20
20
function MyComponent() {
21
21
const { version, loading, error } = useVersion ();
22
-
22
+
23
23
return (
24
24
<div >
25
25
{loading ? " Loading..." : error ? " Version unavailable" : ` v${version } ` }
@@ -70,4 +70,4 @@ The frontend version automatically reflects the backend version. To create a new
70
70
- ** Vite** for build tooling and development server
71
71
- ** Tailwind CSS** for styling
72
72
- ** React Router** for navigation
73
- - ** TanStack Query** for API state management
73
+ - ** TanStack Query** for API state management
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export function useVersion() {
15
15
try {
16
16
const response = await fetch ( "/api/version" ) ;
17
17
const data : VersionResponse = await response . json ( ) ;
18
-
18
+
19
19
if ( response . ok ) {
20
20
setVersion ( data . version ) ;
21
21
} else {
@@ -32,4 +32,4 @@ export function useVersion() {
32
32
} , [ ] ) ;
33
33
34
34
return { version, loading, error } ;
35
- }
35
+ }
Original file line number Diff line number Diff line change @@ -78,13 +78,11 @@ export default function Navbar() {
78
78
< hr className = "my-2 border-t border-gray-300" />
79
79
< div className = "mt-auto pb-4" >
80
80
< div className = "text-xs text-gray-500 text-center" >
81
- { loading ? (
82
- "Loading version..."
83
- ) : error ? (
84
- "Version unavailable"
85
- ) : (
86
- `v${ version } `
87
- ) }
81
+ { loading
82
+ ? "Loading version..."
83
+ : error
84
+ ? "Version unavailable"
85
+ : `v${ version } ` }
88
86
</ div >
89
87
</ div >
90
88
</ div >
You can’t perform that action at this time.
0 commit comments