import { View, Text, Image } from "react-native"; import React from "react"; import { useTailwind } from "tailwind-rn"; export default function Empty({ type }) { const tailwind = useTailwind(); const source = (type) => { switch (type) { case "post": return require("../../assets/images/icon_emptypost.png"); case "friendship": return require("../../assets/images/icon_emptypost.png"); case "location": return require("../../assets/images/icon_emptylocation.png"); case "message": return require("../../assets/images/icon_emptymessage.png"); case "search": return require("../../assets/images/icon_emptysearch.png"); case "internet": return require("../../assets/images/icon_emptyinternet.png"); case "nodata": return require("../../assets/icon/others/nodata.png"); case "nospace": return require("../../assets/icon/others/nodata.png"); } }; const text = (type) => { switch (type) { case "post": return "还没有动态哦~快去邂逅女神吧!"; case "friendship": return "Ta都等急了!行动起来!"; case "location": return "打开位置权限,邂逅同城女神吧~"; case "message": return "犹豫就会败北!爱要勇敢说出来!"; case "search": return "没找到Ta呢……换个试试?"; case "internet": return "网络好像出错了,试着下拉刷新一下吧!"; case "nodata": return "这里空空如也哦~"; case "nospace": return "暂时没有加入的空间哦"; } }; return ( {text(type)} ); }