import { Component } from '@angular/core';
import { DataService } from 'src/services/data/data.service';

@Component({
  selector: 'app-journal-character',
  templateUrl: './journal-character.component.html',
  styleUrls: ['./journal-character.component.scss'],
})
export class JournalCharacterComponent {
  public activeTab: string = 'general';

  public data: any = {};
  public name = sessionStorage.getItem('characterName');

  public constructor(public dataAccessor: DataService) {}

  ngOnInit(): void {
    this.data = this.dataAccessor.characterData;
  }

  public updateData(): void {
    this.dataAccessor.characterData = this.data;
  }
}
