tiefen_space_h5/components/Empty/index.jsx

33 lines
1.0 KiB
React
Raw Normal View History

2024-06-25 20:18:37 +08:00
import React from "react";
2024-12-20 20:47:20 +08:00
import OwnIcon from "../OwnIcon";
2024-06-25 20:18:37 +08:00
export default function Empty({ type }) {
const text = (type) => {
switch (type) {
case "post":
return "还没有动态哦快去与Ta邂逅吧";
case "friendship":
return "Ta都等急了行动起来";
case "location":
return "打开位置权限邂逅同城的Ta吧";
case "message":
return "犹豫就会败北!爱要勇敢说出来!";
case "search":
return "没找到Ta呢……换个试试";
case "internet":
return "网络好像出错了,试着下拉刷新一下吧!";
case "nodata":
return "这里空空如也哦~";
case "nospace":
return "暂时没有加入的空间哦";
}
};
return (
<div className="flex flex-col justify-center items-center">
<div className="w-28 h-28">
2024-12-20 20:47:20 +08:00
<OwnIcon fit="cover" src="/icons/nodata.png" />
2024-06-25 20:18:37 +08:00
</div>
2024-11-05 20:37:22 +08:00
<p className="text-sm text-[#FFFFFF40] mt-3">{text(type)}</p>
2024-06-25 20:18:37 +08:00
</div>
);
}