Skip to content

Commit

Permalink
Remove stateful config
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Feb 6, 2024
1 parent 20b5c1c commit e60c04d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions src/app/showcase/layout/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@ export class AppComponent implements OnInit {

ngOnInit(): void {
this.primeng.ripple = true;
if (isPlatformBrowser(this.platformId)) {
this.checkAppState();
}
}

checkAppState() {
const stored = localStorage.getItem('layout-config');
let _config!: AppConfig;
if (stored) {
_config = JSON.parse(stored) as AppConfig;
this.configService.config.set(_config);
}
}

injectScripts() {
Expand Down
1 change: 0 additions & 1 deletion src/app/showcase/service/appconfigservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export class AppConfigService {
config.tableTheme = !config.darkMode ? config.tableTheme.replace('light', 'dark') : config.tableTheme.replace('dark', 'light');
this._config = { ...config };
this.configUpdate.next(this.config());
localStorage.setItem('layout-config', JSON.stringify(config));
}

showMenu() {
Expand Down

0 comments on commit e60c04d

Please sign in to comment.