import { Component, ReactNode } from 'react';
import { View } from '@tarojs/components';
import { getCurrentInstance } from '@tarojs/runtime';
import Taro from '@tarojs/taro';
import pt from '@/plain-text';

export default class TicketDetail extends Component {
  state = {
    id: 0,
  };
  componentDidMount(): void {
    const navBar = pt.get().navBar;
    Taro.setNavigationBarTitle({
      title: navBar.ticketDetail,
    });
    const { router } = getCurrentInstance();
    const id = router?.params.id;
    this.setState({
      id: id,
    });
  }
  render(): ReactNode {
    return <View>TicketDetail: {this.state.id}</View>;
  }
}
