Skip to content

Commit

Permalink
Merge pull request #129 from KUIT-Space/feat#51-chat_detail
Browse files Browse the repository at this point in the history
lighthouse: add alt attribute in img tag
  • Loading branch information
Turtle-Hwan authored Aug 20, 2024
2 parents 3cd17a7 + 0f35644 commit 1b235c9
Show file tree
Hide file tree
Showing 23 changed files with 138 additions and 93 deletions.
4 changes: 2 additions & 2 deletions src/components/TopBarText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const TopBarText: FC<topbarProps> = ({
}
}}
>
<img src={logo}></img>
<img src={logo} alt="logo"></img>
</sty.StyledLeftDiv>
<sty.StyledCenterDiv>{center}</sty.StyledCenterDiv>
<sty.StyledRightDiv
Expand All @@ -69,7 +69,7 @@ const TopBarText: FC<topbarProps> = ({
}
}}
>
<img src={back}></img>
<img src={back} alt="back"></img>
</sty.StyledLeftDiv>
<sty.StyledCenterDiv>
<sty.StyledCenterP>{center}</sty.StyledCenterP>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BoardPage/BoardBottomModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const BoardBottomModal = ({ selectedOption, onSelect, isOpen, onClose }: BoardBo
onClick={() => onSelect(i)}
>
{option.value}
{isSelcted && <img src={checkModal} />}
{isSelcted && <img src={checkModal} alt="checkModal" />}
</BoardBottomModalItem>
);
})}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/BoardPage/BoardDetailpage/BoardDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ const BoardDetailPage = () => {
key={i + postsData?.title + "img"}
src={img}
className="board-post-detail-content-img"
alt="board post detail content img"
/>
);
})}
Expand Down Expand Up @@ -360,7 +361,7 @@ const BoardDetailPage = () => {
placeholder="๋Œ“๊ธ€์„ ์ž…๋ ฅํ•˜์„ธ์š”."
onChange={(e) => setCommentValue(e.target.value)}
></BoardDetailInput>
<img src={send} onClick={handleRegisterComment} />
<img src={send} onClick={handleRegisterComment} alt="send" />
</BoardDetailInputContainer>
</>
);
Expand Down
8 changes: 6 additions & 2 deletions src/pages/BoardPage/BoardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ const BoardPage = () => {

return (
<>
<TopBarText left={LeftEnum.Logo} center="๊ฒŒ์‹œํŒ" right={<img src={search} />}></TopBarText>
<TopBarText
left={LeftEnum.Logo}
center="๊ฒŒ์‹œํŒ"
right={<img src={search} alt="search" />}
></TopBarText>
<BoardHeader>
<span>๊ฒŒ์‹œ๊ธ€ {postsData.length}๊ฐœ</span>
<div className="board-filter-section" onClick={() => setIsModalOpen((prev) => !prev)}>
{boardSelectedOption[selectedOption].value}
<img src={arrowDown} />
<img src={arrowDown} alt="arrowDown" />
</div>
</BoardHeader>
{postsData.length !== 0 ? (
Expand Down
7 changes: 6 additions & 1 deletion src/pages/BoardPage/BoardPostItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,12 @@ const BoardPostItem = ({
<div className="board-post-item-content-img-container">
{thumbnail &&
thumbnail.map((img, i) => (
<img key={img + i} src={img} className="board-post-item-content-img" />
<img
key={img + i}
src={img}
className="board-post-item-content-img"
alt="board post item content img"
/>
))}
</div>
</BoardPostItemContent>
Expand Down
5 changes: 3 additions & 2 deletions src/pages/BoardPage/BoardRegisterPage/BoardRegisterPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ const BoardRegisterPage = () => {
className="board-register-selected-image"
key={i + image.name}
src={URL.createObjectURL(image)}
alt="board register selected image"
/>
);
})}
Expand All @@ -216,9 +217,9 @@ const BoardRegisterPage = () => {
onChange={handleImageImport}
style={{ display: "none" }}
/>
<img src={camera} />
<img src={camera} alt="camera" />
<img src={gallery} onClick={() => inputImgRef.current?.click()} />
<img src={link} />
<img src={link} alt="link" />
</BoardRegisterFooter>
</>
);
Expand Down
5 changes: 4 additions & 1 deletion src/pages/ChatPage/ChatCreatePage/ChatCreatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ const ChatCreatePage = () => {
}}
>
<section>
<img src={member.profileImgUrl ?? getUserDefaultImageURL(member.userId)} />
<img
src={member.profileImgUrl ?? getUserDefaultImageURL(member.userId)}
alt="member profile"
/>
<span className="name">{member.userName}</span>
{member.userAuth === "manager" && <span className="admin">๊ด€๋ฆฌ์ž</span>}
</section>
Expand Down
5 changes: 4 additions & 1 deletion src/pages/ChatPage/ChatSettingPage/ChatSettingInvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ const ChatSettingInvitePage = () => {
}}
>
<section>
<img src={member.profileImgUrl ?? getUserDefaultImageURL(member.userId)} />
<img
src={member.profileImgUrl ?? getUserDefaultImageURL(member.userId)}
alt="member profile"
/>
<span className="name">{member.userName}</span>
{member.userAuth === "manager" && <span className="admin">๊ด€๋ฆฌ์ž</span>}
</section>
Expand Down
7 changes: 5 additions & 2 deletions src/pages/ChatPage/ChatSettingPage/ChatSettingMemberPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const ChatSettingMemberPage = () => {
}
>
<section>
<img src={AddMemberImg} />
<img src={AddMemberImg} alt="add member" />
<span className="name">์ฑ„ํŒ…๋ฐฉ์— ์ดˆ๋Œ€ํ•˜๊ธฐ</span>
</section>
</Member>
Expand All @@ -65,7 +65,10 @@ const ChatSettingMemberPage = () => {
{userList.map((member, index) => (
<Member key={index} $cursor="default">
<section>
<img src={member.profileImgUrl ?? getUserDefaultImageURL(member.userId)} />
<img
src={member.profileImgUrl ?? getUserDefaultImageURL(member.userId)}
alt="member profile img"
/>
<span className="name">{member.userName}</span>
{member.userAuth === "manager" && <span className="admin">๊ด€๋ฆฌ์ž</span>}
</section>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/HomePage/HomePageMember.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useEffect, useState } from "react";
import { useLocation, useNavigate, useParams } from "react-router-dom";
import { toast, ToastContainer } from "react-toastify";

import { Chatroom, ChatroomSearchAllUserApi, User, spaceSearchAllUserApi } from "@/apis";
import { Chatroom, ChatroomSearchAllUserApi, spaceSearchAllUserApi, User } from "@/apis";
import AddMemberImg from "@/assets/ChatPage/btn_add_member.svg";
import TopBarText, { LeftEnum } from "@/components/TopBarText";
import { Member, MemberContainer } from "@/pages/ChatPage/ChatCreatePage/ChatCreatePage.styled";
import { getUserDefaultImageURL } from "@/utils/getUserDefaultImageURL";
import * as s from "@/pages/HomePage/HomePage.styled";
import { ToastContainer, toast } from "react-toastify";
import { getUserDefaultImageURL } from "@/utils/getUserDefaultImageURL";

const HomePageMemberPage = () => {
const navigate = useNavigate();
Expand Down Expand Up @@ -67,7 +67,7 @@ const HomePageMemberPage = () => {
onClick={clickInviteHandler}
style={{ alignItems: "center", padding: "1rem 0rem 1rem 0rem", cursor: "pointer" }}
>
<img src={AddMemberImg} width={"40px"} height={"40px"}></img>
<img src={AddMemberImg} width={"40px"} height={"40px"} alt="add member" />
<div style={{ marginLeft: "1rem" }}>์ŠคํŽ˜์ด์Šค์— ์ดˆ๋Œ€ํ•˜๊ธฐ</div>
</s.RowFlexDiv>
{userList.map((member, index) => (
Expand Down
7 changes: 4 additions & 3 deletions src/pages/PayPage/CompleteCreatePay.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { BottomBtn } from "@/components/BottomBtn";
import { useNavigate } from "react-router-dom";

import Check from "@/assets/PayPage/check.svg";
import { BottomBtn } from "@/components/BottomBtn";
import * as s from "@/pages/PayPage/PayPage.styled";
import { useNavigate } from "react-router-dom";

const CompleteCreatePay = () => {
const navigator = useNavigate();
Expand All @@ -10,7 +11,7 @@ const CompleteCreatePay = () => {
{/* ์—ฌ๊ธฐ์— ์ง€๊ธˆ height ๋„ฃ์–ด์ค˜์•ผ */}
<s.ContainerDiv>
<div style={{ display: "flex", justifyContent: "center" }}>
<img src={Check}></img>
<img src={Check} alt="check"></img>
</div>
<s.LargeTxt style={{ flex: 1, textAlign: "center" }}>
<p>์ •์‚ฐ์š”์ฒญ์„</p>
Expand Down
7 changes: 4 additions & 3 deletions src/pages/PayPage/CompletePay.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { BottomBtn } from "@/components/BottomBtn";
import { useNavigate } from "react-router-dom";

import Check from "@/assets/PayPage/check.svg";
import { BottomBtn } from "@/components/BottomBtn";
import * as s from "@/pages/PayPage/PayPage.styled";
import { useNavigate } from "react-router-dom";

export type CompletePayType = {
money?: number;
Expand All @@ -17,7 +18,7 @@ const CompletePay = ({ money, account }: CompletePayType) => {
{/* ์—ฌ๊ธฐ์— ์ง€๊ธˆ height ๋„ฃ์–ด์ค˜์•ผ */}
<s.ContainerDiv>
<div style={{ display: "flex", justifyContent: "center" }}>
<img src={Check}></img>
<img src={Check} alt="check"></img>
</div>
<s.LargeTxt style={{ flex: 1, textAlign: "center" }}>
<p>์š”์ฒญ๋ฐ›์€ ์ •์‚ฐ์„</p>
Expand Down
16 changes: 9 additions & 7 deletions src/pages/PayPage/CompleteReqDataDiv.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as s from "@/pages/PayPage/PayPage.styled";
import { NormalBtn } from "@/pages/PayPage/NormalBtn";
import reactIcon from "@/assets/react.svg";
import { useEffect, useState } from "react";
import { toast, ToastContainer } from "react-toastify";

import reactIcon from "@/assets/react.svg";
import { DarkNormalBtn } from "@/pages/PayPage/DarkNormalBtn";
import { GrayBtn } from "@/pages/PayPage/GrayBtn";
import { NormalBtn } from "@/pages/PayPage/NormalBtn";
import { addComma, PayReceiveInfo } from "@/pages/PayPage/PayPage";
import * as s from "@/pages/PayPage/PayPage.styled";

import { ToastContainer, toast } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import { PayReceiveInfo, addComma } from "@/pages/PayPage/PayPage";
import { GrayBtn } from "@/pages/PayPage/GrayBtn";

const ReqDataDiv = ({ data }: { data: PayReceiveInfo }) => {
// useEffect(() => {
Expand All @@ -25,7 +26,8 @@ const ReqDataDiv = ({ data }: { data: PayReceiveInfo }) => {
width={"40px"}
height={"40px"}
style={{ marginRight: "0.625rem" }}
></img>
alt="reaction"
/>
<s.TextDiv>{data.payCreatorName}</s.TextDiv>
<s.GrayBTextDiv style={{ position: "absolute", right: "0rem", marginRight: "3rem" }}>
{price}์›
Expand Down
3 changes: 2 additions & 1 deletion src/pages/PayPage/CreatePayComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const PayChatMemberDiv = ({ info }: { info: UserInfoInSpace }) => {
<img
style={{ width: "2.5rem", height: "2.5rem", marginLeft: "1.875rem" }}
src={info.profileImgUrl ?? getUserDefaultImageURL(info.userId)}
alt="profile"
/>
<span className="name" style={{ marginLeft: "0.75rem" }}>
{info.userName}
Expand All @@ -37,7 +38,7 @@ export const PayChatDiv = ({ info }: { info: ChatUserInfoInSpace }) => {
<s.ColumnFlexDiv>
<Member>
<section>
<img src={info.imgUrl} />
<img src={info.imgUrl} alt="info img" />
<span className="name">{info.chatRoomName}</span>
<s.CountText className="count">{info.userList?.length}</s.CountText>
</section>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/PayPage/CreateRequestPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const idToPrice = new Map<number, number>();
const RecentAccountDiv = ({ data }: { data: BankInfo }) => {
return (
<s.RowFlexDiv style={{ margin: "0.25rem" }}>
<img style={{ marginRight: "0.75rem" }} src={Kookmin}></img>
<img style={{ marginRight: "0.75rem" }} src={Kookmin} alt="kookmin ์€ํ–‰" />
<s.ColumnFlexDiv>
<s.GrayTextDiv>{data.bankName}</s.GrayTextDiv>
<s.RegularText>{data.bankAccountNum}</s.RegularText>
Expand Down Expand Up @@ -235,6 +235,7 @@ const CreateRequestPage2 = ({
? value.profileImgUrl
: getUserDefaultImageURL(value.userId)
}
alt="profile img"
/>
<span className="name">{value.userName}</span>
</section>
Expand Down Expand Up @@ -365,6 +366,7 @@ const CreateRequestPage3 = ({
? value.userProfileImg
: getUserDefaultImageURL(value.userId!)
}
alt="profile img"
/>
<span className="name">{value.userName}</span>
</section>
Expand Down Expand Up @@ -392,6 +394,7 @@ const CreateRequestPage3 = ({
? value.userProfileImg
: getUserDefaultImageURL(value.userId!)
}
alt="profile img"
/>
<span className="name">{value.userName}</span>
</section>
Expand Down Expand Up @@ -479,6 +482,7 @@ const CreateRequestPage4 = ({
? _userData?.profileImgUrl
: getUserDefaultImageURL(_userData!.userId)
}
alt="profile img"
/>
<span className="name">{_userData?.userName}</span>
</section>
Expand Down
21 changes: 11 additions & 10 deletions src/pages/PayPage/PayPage.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import TopBarText, { LeftEnum } from "@/components/TopBarText";
import { GradientBtn } from "@/pages/PayPage/GradientBtn";
import right from "@/assets/PayPage/arrow_right.svg";
import * as s from "@/pages/PayPage/PayPage.styled";
import { useNavigate } from "react-router-dom";
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import axios from "axios";

import { payCompleteApi, payDetailApi, payHomeApi } from "@/apis/Pay/PayPageAPI";
import right from "@/assets/PayPage/arrow_right.svg";
import TopBarText, { LeftEnum } from "@/components/TopBarText";
import { GradientBtn } from "@/pages/PayPage/GradientBtn";
import * as s from "@/pages/PayPage/PayPage.styled";

export const addComma = (price: number) => {
let returnString = price?.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
const returnString = price?.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return returnString;
};

Expand Down Expand Up @@ -108,8 +109,8 @@ const PayPage = () => {
>
<s.TitleDiv>
<s.TitleContentDiv>์š”์ฒญํ•œ ์ •์‚ฐ</s.TitleContentDiv>
<img src={right}></img>
{/* <img src={right} onClick={navigator("์š”์ฒญ์ •์‚ฐํŽ˜์ด์ง€")}></img> */}
<img src={right} alt="right" />
{/* <img src={right} onClick={navigator("์š”์ฒญ์ •์‚ฐํŽ˜์ด์ง€")} alt="right" /> */}
</s.TitleDiv>
{reqData?.length == 0 ? (
<s.NoAlertDiv>์š”์ฒญํ•œ ์ •์‚ฐ์ด ์—†์–ด์š”!</s.NoAlertDiv>
Expand All @@ -129,8 +130,8 @@ const PayPage = () => {
>
<s.TitleDiv>
<s.TitleContentDiv>์š”์ฒญ๋ฐ›์€ ์ •์‚ฐ</s.TitleContentDiv>
<img src={right}></img>
{/* <img src={right} onClick={navigator("์š”์ฒญ๋ฐ›์€์ •์‚ฐํŽ˜์ด์ง€")}></img> */}
<img src={right} alt="right" />
{/* <img src={right} onClick={navigator("์š”์ฒญ๋ฐ›์€์ •์‚ฐํŽ˜์ด์ง€")} /> */}
</s.TitleDiv>
<div>
{recData?.length == 0 ? (
Expand Down
11 changes: 7 additions & 4 deletions src/pages/PayPage/PayResult.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as s from "@/pages/PayPage/PayPage.styled";
import bell from "@/assets/PayPage/bell.svg";
import check from "@/assets/PayPage/check.svg";
import ReactImg from "@/assets/react.svg";
import { addComma, payTargetInfoDtoList } from "./PayPage";
import * as s from "@/pages/PayPage/PayPage.styled";
import { getUserDefaultImageURL } from "@/utils/getUserDefaultImageURL";

import { addComma, payTargetInfoDtoList } from "./PayPage";

const PayResult = ({ props }: { props: payTargetInfoDtoList }) => {
const price = addComma(props.requestAmount);
return (
Expand All @@ -17,7 +18,8 @@ const PayResult = ({ props }: { props: payTargetInfoDtoList }) => {
}
width={"40px"}
height={"40px"}
></img>
alt="profile"
/>
<s.ColumnFlexDiv style={{ marginLeft: "0.75rem", justifyContent: "start" }}>
<s.TextDiv>{props.targetUserName}</s.TextDiv>
<s.BoldText style={{ textAlign: "start" }}>{price}์›</s.BoldText>
Expand All @@ -27,7 +29,8 @@ const PayResult = ({ props }: { props: payTargetInfoDtoList }) => {
width={"36px"}
height={"36px"}
style={{ marginLeft: "auto" }}
></img>
alt="check"
/>
</s.RowFlexDiv>
);
};
Expand Down
Loading

0 comments on commit 1b235c9

Please sign in to comment.