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

shorts UI 수정 #178

Merged
merged 4 commits into from
Sep 30, 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
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