diff --git a/apps/app/components/Profile/index.tsx b/apps/app/components/Profile/index.tsx index e0101339..dd66fff2 100644 --- a/apps/app/components/Profile/index.tsx +++ b/apps/app/components/Profile/index.tsx @@ -6,15 +6,10 @@ import { Row, Space, Tabs, - Tag, Timeline, Typography, } from "antd"; -import { - ClockCircleOutlined, - FontSizeOutlined, - UserOutlined, -} from "@ant-design/icons"; +import { ClockCircleOutlined, UserOutlined } from "@ant-design/icons"; import moment from "moment"; import "moment/locale/pt"; @@ -24,19 +19,13 @@ import Document from "~/components/Document"; import * as api from "bokkenjs"; import * as socials from "~/lib/social"; import { notifyError, notifyInfo } from "~/components/Notification"; -import styles from "./style.module.css"; import { EUser, getNinjasAsAdmin, updateGuardianAsAdmin } from "bokkenjs"; - -import { BsFileEarmarkPersonFill } from "react-icons/bs"; import Link from "next/link"; - -import { getIcon, getImg } from "~/lib/utils"; -import Guardian from "pages/admin/guardians"; -import { icons } from "react-icons"; +import { getIcon } from "~/lib/utils"; const { TabPane } = Tabs; -const { Title, Text } = Typography; +const { Title } = Typography; interface Props { id: string; @@ -49,8 +38,7 @@ function Profile({ id, role }: Props) { const [projects, setProjects] = useState([]); const [skills, setSkills] = useState([]); const [date, setDate] = useState(""); - const [guardian, setGuardians] = useState([]); - const [ninja, setNinja] = useState([]); + const [guardian, setGuardians] = useState([]); useEffect(() => { const fetchUserByRole = async () => { @@ -135,8 +123,7 @@ function Profile({ id, role }: Props) { api .getGuardian(info.guardian_id) .then((response: any) => setGuardians(response.data)) - .catch((error: any) => { -}); + .catch((error: any) => {}); } }, [info.guardian_id, role]); console.log(badges); @@ -211,7 +198,7 @@ function Profile({ id, role }: Props) { display: "inline-block", fontSize: 20, marginRight: "6px", - color:"#424549" + color: "#424549", }} key={s.id} > @@ -278,122 +265,3 @@ function Profile({ id, role }: Props) { } export default Profile; - -{ - /* - - } - /> - - - - {info.first_name} {info.last_name} - - - - - <BsFileEarmarkPersonFill />{role} - - - - Conta criada em: {date} - - - {"belt" in info && ( - - - - )} - - - - {info?.socials?.map((social: any) => - social?.name == "discord" || social?.name == "slack" ? ( - - {socials.ICONS[social.name as keyof typeof socials.URLS]} - - ) : ( - - {socials.ICONS[social.name as keyof typeof socials.URLS]} - - ) - )} - - - - - {skills.map((s) => ( - - {getIcon(s.name)} {s.name} - - ))} - - - - - - - - }> - Registou-se na plataforma{" "} - {moment(info.since).locale("pt").fromNow()} - - - -{role === EUser.Ninja && ( - - {badges.length == 0 ? ( - - ) : ( - - {badges.map((badge) => ( - - - - - - ))} - - )} - -)} - - {projects.length == 0 ? ( - - ) : ( - - {projects.map((project) => ( - - - - - - ))} - - )} - - */ -} diff --git a/apps/app/lib/utils.tsx b/apps/app/lib/utils.tsx index 129e6456..b7cd655b 100644 --- a/apps/app/lib/utils.tsx +++ b/apps/app/lib/utils.tsx @@ -42,45 +42,3 @@ export function getIcon(skill: string) { return ; } } - -export function getImg(skill: string) { - switch (skill) { - case "Python": - return ( - Python Logo - ); - case "Scratch": - return ; - case "HTML/CSS/Javascript": - return ( -
- HTML - CSS - JavaScript -
- ); - } -}