import { Component, OnInit } from '@angular/core';
import { IonicModule } from '@ionic/angular';
import * as Parse from 'parse';
import { NavComponent } from '../../../app/components/nav/nav.component';
import { AiChatService } from '../../../services/aichart.service';

@Component({
  selector: 'app-ranking',
  templateUrl: './ranking.component.html',
  styleUrls: ['./ranking.component.scss'],
  standalone: true,
  imports: [IonicModule,NavComponent],
})
export class RankingComponent implements OnInit {
  user?: Parse.Object = Parse.User.current();
  orderList: Array<any> = [];
  constructor(
    private aiServ: AiChatService
  ) {}

  async ngOnInit() {
    this.orderList = await this.aiServ.getOrderAnchor()
    console.log(this.orderList);
  }
}
