Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hotfix] 홈화면 들준마 레이아웃 모바일 깨짐 수정 #358

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions src/components/Buyer/BuyerHome/HomeConsultInReady.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,26 @@ import { Space } from 'components/Common/Space';
import { getCurrentHour } from 'utils/getCurrentHour';
import { Flex } from 'components/Common/Flex';
import CounselorCard from 'components/Common/CounselorCard';
///
///
///

//
//
//

interface HomeConsultInReadyProps {
searchData: SearchResultData[];
}
///
///
///

//
//
//

export const HomeConsultInReady = ({ searchData }: HomeConsultInReadyProps) => {
const navigate = useNavigate();

//
//
//

return (
<Wrapper>
<div
Expand Down Expand Up @@ -95,6 +103,7 @@ const Wrapper = styled.section`
cursor: pointer;
}
`;

const NavConsult = styled.div`
width: 100%;
span#current-time {
Expand All @@ -106,6 +115,7 @@ const NavConsult = styled.div`
align-items: center;
}
`;

const MoreIcon = styled(More)`
margin-left: auto;
`;
17 changes: 10 additions & 7 deletions src/components/Common/CounselorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,17 @@ const CounselorCard = ({
return (
<Flex direction="column" align="flex-start">
{isRealtime ? (
<TimeWrapper>
<Caption2
color={White}
>{`${hours}시 기준 실시간 상담 가능`}</Caption2>
</TimeWrapper>
<Flex justify="flex-start" width="100%">
<TimeWrapper>
<Caption2
color={White}
>{`${hours}시 기준 실시간 상담 가능`}</Caption2>
</TimeWrapper>
</Flex>
) : null}
<InfoWrapper isRealtime={isRealtime}>
<Flex direction="column" gap="1rem" align="flex-start">
<Flex gap="1rem">
<Flex gap="1rem" width="100%" justify="flex-start">
<ImgWrapper>
<Characters number={consultStyle} />
</ImgWrapper>
Expand All @@ -192,7 +194,7 @@ const CounselorCard = ({
</Flex>
</Flex>
</Flex>
<Flex gap="0.8rem">
<Flex gap="0.8rem" width="100%" justify="flex-start">
{tagList.map((value: any) => {
return (
<TagA2Cartegory key={value} tagType={value} bgColorType={3} />
Expand Down Expand Up @@ -298,6 +300,7 @@ const BookMarkIcon = styled(BookMark)`
padding-left: 0.8rem;
cursor: pointer;
`;

const NoneBookMarkIcon = styled(NoneBookMark)`
padding-left: 0.8rem;
cursor: pointer;
Expand Down
11 changes: 11 additions & 0 deletions src/pages/Buyer/BuyerHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ import HomeAboutFooterSection from 'components/Common/HomeAboutFooterSection';
import { SearchResultData } from 'utils/type';
import { useEffect, useState } from 'react';
import { patchCounselorsAll } from 'api/patch';

//
//
//

export const BuyerHome = () => {
const navigate = useNavigate();
const [searchData, setSearchData] = useState<SearchResultData[]>([]);

//
//
//
useEffect(() => {
const fectchSearchResults = async () => {
try {
Expand All @@ -34,6 +40,11 @@ export const BuyerHome = () => {
};
fectchSearchResults();
}, [navigate]);

//
//
//

return (
<Wrapper>
<Header
Expand Down
Loading