import { Component } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { TaskModalComponent } from '../shared/task-modal/task-modal.component';

@Component({
  selector: 'app-tab1',
  templateUrl: 'tab1.page.html',
  styleUrls: ['tab1.page.scss'],
  standalone: false,
})
export class Tab1Page {
  currentDate: string;

  constructor(private modalCtrl: ModalController) {this.currentDate = new Date().toLocaleDateString();}

  async openTaskModal() {
    const modal = await this.modalCtrl.create({
      component: TaskModalComponent
    });
    return await modal.present();
  }
}
