- {props.login}{" "}
+
+
+
+
+ {login}
0
- ? "border-green-500 text-green-500"
- : "border-red-500 text-red-500"
+ className={`border rounded-md px-2 py-1 min-w-8 text-sm flex items-center justify-center ${
+ rating > 0 ?
+ "border-green-500 text-green-500"
+ : "border-red-500 text-red-500"
}`}
>
- {props.rating}
+ {rating}
-
-
- {props.status}
-
+
+
{status}
-
- {props.socials.hasSocials && !props.socials.isPrivate && (
-
- {props.socials.socials
- .filter((social: any) => {
- if (social.nickname == "") {
- return false;
- }
- return true;
- })
- .map((social: any) => {
- if (social.name == "discord" && social.nickname != "")
- return (
-
- );
- return (
-
-
-
- );
- })}
+
+ {(socials.vk ||
+ socials.tg ||
+ socials.discord ||
+ socials.tt ||
+ socials.inst) && (
+
+ {socials.vk && (
+
+
+
+ )}
+ {socials.tg && (
+
+
+
+ )}
+ {socials.tt && (
+
+
+
+ )}
+ {socials.inst && (
+
+
+
+ )}
+ {socials.discord && (
+
+ )}
)}
diff --git a/app/pages/Profile.tsx b/app/pages/Profile.tsx
index 7a81d93..65bd2c3 100644
--- a/app/pages/Profile.tsx
+++ b/app/pages/Profile.tsx
@@ -59,50 +59,7 @@ export const ProfilePage = (props: any) => {
);
}
- const hasSocials =
- user.vk_page != "" ||
- user.tg_page != "" ||
- user.tt_page != "" ||
- user.inst_page != "" ||
- user.discord_page != "" ||
- false;
- const socials = [
- {
- name: "vk",
- nickname: user.vk_page,
- icon: "fa6-brands--vk",
- urlPrefix: "https://vk.com/",
- },
- {
- name: "telegram",
- nickname: user.tg_page,
- icon: "fa6-brands--telegram",
- urlPrefix: "https://t.me/",
- },
- {
- name: "discord",
- nickname: user.discord_page,
- icon: "fa6-brands--discord",
- },
- {
- name: "tiktok",
- nickname: user.tt_page,
- icon: "fa6-brands--tiktok",
- urlPrefix: "https://tiktok.com/@",
- },
- {
- name: "instagram",
- nickname: user.inst_page,
- icon: "fa6-brands--instagram",
- urlPrefix: "https://instagram.com/",
- },
- ];
- const hasChips =
- user.is_verified ||
- user.is_blocked ||
- (user.roles && user.roles.length > 0) ||
- isMyProfile;
const isPrivacy =
user.is_stats_hidden || user.is_counts_hidden || user.is_social_hidden;
@@ -120,7 +77,45 @@ export const ProfilePage = (props: any) => {
is_me_blocked={user.is_me_blocked}
/>