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";
1919
2020function MyComponent() {
2121 const { version, loading, error } = useVersion ();
22-
22+
2323 return (
2424 <div >
2525 {loading ? " Loading..." : error ? " Version unavailable" : ` v${version } ` }
@@ -70,4 +70,4 @@ The frontend version automatically reflects the backend version. To create a new
7070- ** Vite** for build tooling and development server
7171- ** Tailwind CSS** for styling
7272- ** 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() {
1515 try {
1616 const response = await fetch ( "/api/version" ) ;
1717 const data : VersionResponse = await response . json ( ) ;
18-
18+
1919 if ( response . ok ) {
2020 setVersion ( data . version ) ;
2121 } else {
@@ -32,4 +32,4 @@ export function useVersion() {
3232 } , [ ] ) ;
3333
3434 return { version, loading, error } ;
35- }
35+ }
Original file line number Diff line number Diff line change @@ -78,13 +78,11 @@ export default function Navbar() {
7878 < hr className = "my-2 border-t border-gray-300" />
7979 < div className = "mt-auto pb-4" >
8080 < 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 } ` }
8886 </ div >
8987 </ div >
9088 </ div >
You can’t perform that action at this time.
0 commit comments