-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2093437
commit aa90ef6
Showing
5 changed files
with
109 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright DB InfraGO AG and contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { useState, useEffect } from 'react'; | ||
import { ROUTE_PREFIX } from '../APIConfig'; | ||
import { SquareMousePointer } from 'lucide-react'; | ||
|
||
export const AppInfo = () => { | ||
const [currentVersion, setcurrentVersion] = useState(null); | ||
|
||
useEffect(() => { | ||
fetch(`${ROUTE_PREFIX}/static/version.json`) | ||
.then((response) => response.json()) | ||
.then((data) => setcurrentVersion(data.git)) | ||
.catch((error) => { | ||
console.error(error); | ||
setcurrentVersion({ version: 'Fetch failed' }); | ||
}); | ||
}, []); | ||
|
||
return ( | ||
<div className="text-gray-500 dark:text-gray-300 print:hidden"> | ||
{currentVersion && <p>Version: {currentVersion.version}</p>} | ||
<a | ||
href="https://github.com/DSD-DBS/capella-model-explorer" | ||
target="_blank" | ||
className="text-custom-blue hover:text-custom-blue-hover"> | ||
Contribute on GitHub | ||
<SquareMousePointer | ||
className=" | ||
ml-1 inline-block h-4 w-4 text-custom-blue | ||
hover:text-custom-blue-hover" | ||
/> | ||
</a> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters