Skip to content
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
5 changes: 4 additions & 1 deletion src/components/header/header.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Link } from "react-router";
import styled from "styled-components";
import logoImage from "../../assets/logo.svg";
import { media } from "../../utils/media";
Expand Down Expand Up @@ -27,7 +28,9 @@ function Header({ className, children }) {
return (
<StyledHeader className={className}>
<HeaderContent>
<img src={logoImage} alt="로고" />
<Link to="/">
<img src={logoImage} alt="로고" />
</Link>
<div>{children}</div>
</HeaderContent>
</StyledHeader>
Expand Down
26 changes: 21 additions & 5 deletions src/layouts/onboarding-layout.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
import { useNavigate } from "react-router";
import styled from "styled-components";
import { OutlinedButton } from "../components/button/button";
import BUTTON_SIZE from "../components/button/button-size";
import Header from "../components/header/header";

const LayoutHeader = styled(Header)`
flex-shrink: 0;
`;

const Main = styled.main`
flex-grow: 1;
min-height: 100vh - 64px;
`;

const StyledOnbardingLayout = styled.div`
display: flex;
flex-direction: column;
height: 100vh;
`;

function OnboardingLayout({ children }) {
const navigate = useNavigate();

const handlePostCreate = () => navigate("/post");

return (
<>
<Header>
<StyledOnbardingLayout>
<LayoutHeader>
<OutlinedButton
size={BUTTON_SIZE.medium}
title="롤링 페이퍼 만들기"
onClick={handlePostCreate}
/>
</Header>
<main>{children}</main>
</>
</LayoutHeader>
<Main>{children}</Main>
</StyledOnbardingLayout>
);
}

Expand Down
15 changes: 7 additions & 8 deletions src/pages/rolling-paper-list-page.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { PrimaryButton } from "../components/button/button";
import BUTTON_SIZE from "../components/button/button-size";
import React, { useEffect, useState, useMemo } from "react";
import { useEffect, useMemo, useState } from "react";
import { useNavigate } from "react-router";
import styled from "styled-components";
import { apiClient } from "../api/client";
import { PrimaryButton } from "../components/button/button";
import BUTTON_SIZE from "../components/button/button-size";
import RollingPaperList from "../features/rolling-paper/components/rolling-paper-list";
import { media } from "../utils/media";
import { useMedia } from "../hooks/use-media";
import { apiClient } from "../api/client";
import { media } from "../utils/media";

const TopContainer = styled.div`
text-align: center;
margin-top: 50px;
min-height: calc(100vh - 64px);
display: flex;
flex-direction: column;
`;
Expand Down Expand Up @@ -72,7 +71,7 @@ function getCachedImage(url) {
return cache[url].src;
}

function ShowMessageList() {
function RollingPaperListPage() {
const navigate = useNavigate();

const [recipientsData, setRecipientsData] = useState([]);
Expand Down Expand Up @@ -188,4 +187,4 @@ function ShowMessageList() {
);
}

export default ShowMessageList;
export default RollingPaperListPage;