Add version to the menu

This commit is contained in:
Arnaud 2024-09-26 17:21:29 +02:00
parent 5a41d8d201
commit f76c3bf7ee
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
5 changed files with 16 additions and 4 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@codex-storage/marketplace-ui",
"version": "0.0.1",
"version": "0.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@codex-storage/marketplace-ui",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",
"dependencies": {
"@codex-storage/marketplace-ui-components": "0.0.9",

View File

@ -5,7 +5,7 @@
"type": "git",
"url": "https://github.com/codex-storage/codex-marketplace-ui"
},
"version": "0.0.1",
"version": "0.0.2",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -82,7 +82,14 @@ const Layout = () => {
},
] satisfies MenuItem[];
return <Page children={<Outlet />} items={items} Right={Right} />;
return (
<Page
children={<Outlet />}
items={items}
Right={Right}
version={__APP_VERSION__}
/>
);
};
export const Route = createFileRoute("/dashboard")({

2
src/vite-env.d.ts vendored
View File

@ -1,5 +1,7 @@
/// <reference types='vite/client' />
declare const __APP_VERSION__: string;
interface ImportMetaEnv {
VITE_CODEX_API_URL: string;
}

View File

@ -5,6 +5,9 @@ import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [TanStackRouterVite(), react()],
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
build: {
sourcemap: true,
rollupOptions: {