Skip to content

Commit

Permalink
[Merge] develop ๊ณผ merge #32
Browse files Browse the repository at this point in the history
why
feed main ํŽ˜์ด์ง€๋ฅผ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด์„œ

how
๊ทœ์ข…๋‹˜์ด ์ž‘์—…ํ•˜์‹  feed write ์ปจํ…Œ์ด๋„ˆ ๋ถ™์ž„
feed -> Feed ๋กœ ํด๋”์ด๋ฆ„ ๋ณ€๊ฒฝ
  • Loading branch information
WooYeonSeo committed Nov 25, 2019
1 parent f2dd397 commit 3b8cc63
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 62 deletions.
2 changes: 1 addition & 1 deletion client/src/__test__/components/WritingFeed.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import '@testing-library/jest-dom/extend-expect';
import { render, cleanup } from '@testing-library/react';
import WritingFeed from '../../composition/feed/WritingFeed';
import WritingFeed from '../../composition/Feed/WritingFeed';
import { ThemeProvider } from 'styled-components';
import theme from '../../style/theme';

Expand Down
4 changes: 2 additions & 2 deletions client/src/composition/feed/Comment.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import styled from "styled-components";
import React from 'react';
import styled from 'styled-components';

interface ITest {
size: string;
Expand Down
15 changes: 7 additions & 8 deletions client/src/composition/feed/Feed.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from "react";
import styled from "styled-components";
import FeedHeader from "./FeedHeader";
import FeedBody from "./FeedBody";
import FeedFooter from "./FeedFooter";
import Comment from "./Comment";
import buttons from "../../image/buttons.png";
import React from 'react';
import styled from 'styled-components';
import FeedHeader from './FeedHeader';
import FeedBody from './FeedBody';
import FeedFooter from './FeedFooter';
import Comment from './Comment';

const FeedDiv = styled.div`
${props => props.theme.borders.feedBorder};
Expand All @@ -20,7 +19,7 @@ const FeedContentDiv = styled.div`
const FeedEditDiv = styled.span`
float: right;
cursor: pointer;
background-image: url(${buttons});
background-image: url('/images/buttons.png');
background-repeat: no-repeat;
background-size: 64px 134px;
background-position: 0 -66px;
Expand Down
4 changes: 2 additions & 2 deletions client/src/composition/feed/FeedContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import FeedPresentor from './FeedPresentor';
import WritingFeed from '../../composition/feed/WritingFeed';
import WritingFeedContainer from './WritingFeed';

const FeedContainer: React.FC = () => {
return (
<>
<WritingFeed />
<WritingFeedContainer />
<FeedPresentor />
</>
);
Expand Down
14 changes: 8 additions & 6 deletions client/src/composition/feed/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { useState, useMemo, useEffect } from "react";
import Feed from "./Feed";
import { useQuery } from "@apollo/react-hooks";
import gql from "graphql-tag";
import useScrollEnd from "../../hooks/useScrollEnd";
import React, { useState, useMemo, useEffect } from 'react';
import Feed from './Feed';
import { useQuery } from '@apollo/react-hooks';
import gql from 'graphql-tag';
import useScrollEnd from '../../hooks/useScrollEnd';
import WritingFeedContainer from './WritingFeed';

interface IFeed {
content: string;
Expand All @@ -29,7 +30,7 @@ interface FeedVars {
const OFFSET = 2;
const FeedContainer = () => {
const [feeds, setFeeds] = useState<IFeed[]>([]);
const [cursor, setCursor] = useState<string>("9999-12-31T09:29:26.050Z");
const [cursor, setCursor] = useState<string>('9999-12-31T09:29:26.050Z');

const checkEnd = useScrollEnd();
// hooks ์—์„œ useQuery 1 ๋ถ€ํ„ฐ ์‹œ์ž‘
Expand Down Expand Up @@ -73,6 +74,7 @@ const FeedContainer = () => {

return (
<>
<WritingFeedContainer />
{feeds.map(feed => (
<Feed content={feed.content} createdAt={feed.createdAt} />
))}
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/Main/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import Feed from '../../composition/feed';
import FeedContainer from '../../composition/Feed';

const SignUp: React.FC = () => {
return <Feed />;
return <FeedContainer />;
};

export default SignUp;
41 changes: 0 additions & 41 deletions client/src/pages/feed/FeedContainer.tsx

This file was deleted.

0 comments on commit 3b8cc63

Please sign in to comment.