Skip to content

Commit

Permalink
Merge pull request #178 from KNU-HAEDAL/Fix/issue-#177-1
Browse files Browse the repository at this point in the history
shorts UI 수정
  • Loading branch information
Dobbymin authored Sep 30, 2024
2 parents ede4959 + 181a042 commit 7873472
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 26 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --host",
"build": "tsc && vite build",
"port": "vite --host 0.0.0.0 --port 5173",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
Expand Down
Binary file added src/assets/shorts/shorts-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/pages/shorts/components/contents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ export default ShortsContents;
const ShortsContentsBox = styled.div`
display: flex;
flex-direction: column;
margin: 1rem 1rem;
margin: 0.5rem 1rem;
`;
16 changes: 2 additions & 14 deletions src/pages/shorts/components/image/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
import ChallengeImg from '@/assets/challenge/Challenge-Img.png';
import ChallengeImg from '@/assets/shorts/shorts-img.png';
import { Image } from '@chakra-ui/react';
import styled from '@emotion/styled';

const ShortsImage = () => {
return (
<>
<ShortsImageBox>
<Image width='100%' src={ChallengeImg} />
</ShortsImageBox>
</>
);
return <Image objectFit='cover' src={ChallengeImg} />;
};

export default ShortsImage;

export const ShortsImageBox = styled.div`
display: flex;
margin: 1rem 0;
`;
3 changes: 2 additions & 1 deletion src/pages/shorts/components/info/category-icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default CategoryIcon;

const ShortsInfoIconBox = styled.div<{ borderColor: string }>`
display: flex;
padding: 0.75rem;
width: 4rem;
height: 3.25rem;
align-items: center;
justify-content: center;
border-radius: 100%;
Expand Down
6 changes: 4 additions & 2 deletions src/pages/shorts/components/info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const ShortsInfoLayout = styled.div`
flex-direction: row;
margin-left: 1rem;
align-items: center;
padding: 2rem 0;
`;

export const ShortsInfoTextBox = styled.div`
Expand All @@ -71,7 +72,8 @@ export const ShortsStartBox = styled.div`
align-items: center;
text-align: center;
border-radius: 100%;
width: 3rem;
height: 3rem;
background-color: #5cc6ba;
padding: 1rem;
/* padding: 1rem; */
`;
4 changes: 2 additions & 2 deletions src/pages/shorts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const Shorts = () => {
}))
);

console.log(data?.data.data);
return (
<>
<TopBar type='Page' title='' backgroundColor='var(--color--green-06)' />
Expand Down Expand Up @@ -109,9 +108,10 @@ const Shorts = () => {
export default Shorts;

const ShortsLayout = styled.div`
height: 100vh;
height: 80vh;
display: flex;
flex-direction: column;
gap: auto;
`;

const SwiperBox = styled(Swiper)`
Expand Down
13 changes: 9 additions & 4 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ const router = createBrowserRouter([
},
],
},
{
path: RouterPath.shorts,
element: (
<ProtectedRoute>
<ShortsPage />
</ProtectedRoute>
),
},
{
path: RouterPath.rank,
element: (
Expand Down Expand Up @@ -120,10 +128,7 @@ const router = createBrowserRouter([
},
],
},
{
path: RouterPath.shorts,
element: <ShortsPage />,
},

{
path: RouterPath.login,
element: <LoginPage />,
Expand Down

0 comments on commit 7873472

Please sign in to comment.