feat: test popup not done
This commit is contained in:
82
src/components/NTRPTestEntryCard/index.tsx
Normal file
82
src/components/NTRPTestEntryCard/index.tsx
Normal file
@@ -0,0 +1,82 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { View, Image, Text } from "@tarojs/components";
|
||||
import { useUserInfo, useUserActions } from "@/store/userStore";
|
||||
import DocCopy from "@/static/ntrp/ntrp_doc_copy.svg";
|
||||
import ArrowRight from "@/static/ntrp/ntrp_arrow_right_color.svg";
|
||||
import styles from "./index.module.scss";
|
||||
|
||||
function NTRPTestEntryCard(props) {
|
||||
const userInfo = useUserInfo();
|
||||
// const { fetchUserInfo } = useUserActions()
|
||||
|
||||
// useEffect(() => {
|
||||
// fetchUserInfo()
|
||||
// }, [])
|
||||
const { type } = props;
|
||||
return type !== "list" ? (
|
||||
<View className={styles.higher}>
|
||||
<View className={styles.desc}>
|
||||
<View>
|
||||
<View className={styles.title}>
|
||||
<Text>快速测一测✏️</Text>
|
||||
</View>
|
||||
<View className={styles.title}>
|
||||
<Text>你的</Text>
|
||||
<Text className={styles.colorTip}> (</Text>
|
||||
<Text className={styles.strongTip}>NTRP</Text>
|
||||
<Text className={styles.colorTip}>) </Text>
|
||||
<Text>水平?</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.entry}>
|
||||
<Text>快速测试</Text>
|
||||
<Image className={styles.entryIcon} src={ArrowRight} />
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.avatarWrap}>
|
||||
<View className={styles.avatar}>
|
||||
<Image
|
||||
className={styles.avatarUrl}
|
||||
src={userInfo.avatar_url}
|
||||
mode="aspectFit"
|
||||
/>
|
||||
</View>
|
||||
{/* avatar side */}
|
||||
<View className={styles.addonImage}>
|
||||
<Image className={styles.docImage} src={DocCopy} mode="aspectFill" />
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
) : (
|
||||
<View className={styles.lower}>
|
||||
<View className={styles.desc}>
|
||||
<View className={styles.title}>
|
||||
<Text>不知道自己的</Text>
|
||||
<Text className={styles.colorTip}> (</Text>
|
||||
<Text className={styles.strongTip}>NTRP</Text>
|
||||
<Text className={styles.colorTip}>) </Text>
|
||||
<Text>水平?</Text>
|
||||
</View>
|
||||
<View className={styles.entry}>
|
||||
<Text>快速测试</Text>
|
||||
<Image className={styles.entryIcon} src={ArrowRight} />
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.avatarWrap}>
|
||||
<View className={styles.avatar}>
|
||||
<Image
|
||||
className={styles.avatarUrl}
|
||||
src={userInfo.avatar_url}
|
||||
mode="aspectFit"
|
||||
/>
|
||||
</View>
|
||||
{/* avatar side */}
|
||||
<View className={styles.addonImage}>
|
||||
<Image className={styles.docImage} src={DocCopy} mode="aspectFill" />
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
export default NTRPTestEntryCard;
|
||||
Reference in New Issue
Block a user