import Layout from "@/components/layout/Layout";
import { View, Text } from "@tarojs/components";
import { useDidShow } from "@tarojs/taro";
import { usePageContent } from "./hooks";

export default function Index() {
  const { pageLoading, pageContent, loadPageContent } = usePageContent();

  useDidShow(async () => {
    await loadPageContent("测试身份编码");
    console.log("Page shown.");
  });

  return (
    <Layout loadding={pageLoading}>
      <View className="h-[200px] text-center leading-[200px] bg-red-500 text-white text-2xl">
        <Text className="">{pageContent}</Text>
      </View>
    </Layout>
  );
}
