Skip to content

Commit

Permalink
Update type declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
GCHQDeveloper81 committed Jul 18, 2024
1 parent 455c998 commit ff2a53a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces

declare global {
declare const PUBLIC_VERSION: string;

namespace App {
// interface Error {}
// interface Locals {}
Expand Down
6 changes: 2 additions & 4 deletions src/lib/components/layout/nav/SideNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
import { page } from '$app/stores';
import { shouldHighlightSideNav } from '$lib/util/nav.utils';
import { sources } from '$stores/sources/sources.store';
// this will be set to the version number from package.json
declare const PUBLIC_VERSION: string;
import { version } from '$lib/constants';
type SideNavItemDetail = {
[key in SideNavId]: {
Expand Down Expand Up @@ -94,7 +92,7 @@

<ic-side-navigation
app-title="LD-Explorer"
version={`v${PUBLIC_VERSION}`}
version={`v${version}`}
data-testid="main-nav"
status="Prototype"
collapsed-icon-labels
Expand Down
2 changes: 2 additions & 0 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// PUBLIC_VERSION will be set to the version number from package.json
export const version = PUBLIC_VERSION;

0 comments on commit ff2a53a

Please sign in to comment.