Skip to content

Commit

Permalink
fix providers
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Aug 11, 2024
1 parent 05f9f1a commit 031d6b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion webapp/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Preview } from '@storybook/angular';
import { applicationConfig, Preview } from '@storybook/angular';
import { withThemeByClassName } from '@storybook/addon-themes';
import { DocsContainer } from '@storybook/blocks';
import { createElement } from 'react';
import { themes } from '@storybook/core/theming';
import { appConfig } from 'app/app.config';

const preview: Preview = {
parameters: {
Expand Down Expand Up @@ -56,6 +57,7 @@ const preview: Preview = {
},
defaultTheme: 'dark',
}),
applicationConfig(appConfig),
],
};

Expand Down
4 changes: 2 additions & 2 deletions webapp/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<main class="container">
<header class="flex items-center justify-between py-4">
<div class="flex gap-2 items-center">
<a class="flex gap-2 items-center hover:text-muted-foreground" href="/">
<lucide-angular name="hammer" class="size-6" />
<span class="text-xl font-semibold">Hephaestus</span>
</div>
</a>
<app-theme-switcher />
</header>
<div class="flex gap-2 m-2 flex-col items-start">
Expand Down
5 changes: 3 additions & 2 deletions webapp/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ApplicationConfig, importProvidersFrom, provideExperimentalZonelessChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { provideAngularQuery, QueryClient } from '@tanstack/angular-query-experimental';
import { LucideAngularModule, Home, Sun, Moon, Hammer } from 'lucide-angular';
Expand All @@ -14,6 +14,7 @@ export const appConfig: ApplicationConfig = {
provideAngularQuery(new QueryClient()),
{ provide: BASE_PATH, useValue: 'http://localhost:8080' },
provideHttpClient(withInterceptorsFromDi()),
importProvidersFrom([BrowserAnimationsModule, LucideAngularModule.pick({ Home, Sun, Moon, Hammer })])
provideAnimationsAsync(),
importProvidersFrom(LucideAngularModule.pick({ Home, Sun, Moon, Hammer }))
]
};

0 comments on commit 031d6b0

Please sign in to comment.