- )
-}
-
-export default MessageEditor
diff --git a/frontend/src/page/WorkspacePage/WorkspacePage.js b/frontend/src/page/WorkspacePage/WorkspacePage.js
index a77f8e0d..a04ea402 100644
--- a/frontend/src/page/WorkspacePage/WorkspacePage.js
+++ b/frontend/src/page/WorkspacePage/WorkspacePage.js
@@ -1,25 +1,33 @@
-import React, { useState } from 'react'
-import styled from 'styled-components'
-import { useParams } from 'react-router-dom'
+import React, { useState, useEffect } from 'react'
+import styled, { css } from 'styled-components'
+import { useParams, Route } from 'react-router-dom'
import { useRecoilValue } from 'recoil'
import { modalRecoil } from '../../store'
import { throttle } from '../../util'
-import ChannelList from '../../organism/ChannelList'
-import ChannelListHeader from '../../atom/ChannelListHeader'
-import ChatRoom from '../../organism/ChatRoom'
+import ChannelList from '../../container/ChannelList'
+import ChannelListHeader from '../../presenter/ChannelListHeader'
+import ChatRoom from '../../container/ChatRoom'
+import SideThreadBar from '../../container/SideThreadBar'
import { COLOR } from '../../constant/style'
-import Icon from '../../atom/Icon'
+import Icon from '../../presenter/Icon'
import { TOOLS } from '../../constant/icon'
import useWorkspace from '../../hooks/useWorkspace'
import useSocket from '../../hooks/useSocket'
function WorkspacePage() {
- const { channelId } = useParams()
+ const { channelId, chatId } = useParams()
const [lineWidth, setLineWidth] = useState(20)
+ const [sideBarWidth, setSideBarWidth] = useState(30)
const modal = useRecoilValue(modalRecoil)
- useWorkspace()
+ const [workspaceUserInfo] = useWorkspace()
useSocket()
+
+ useEffect(() => {
+ if (chatId !== undefined) setSideBarWidth(30)
+ else setSideBarWidth(0)
+ }, [chatId])
+
const moveLine = e => {
if (e.pageX === 0) return false
let mouse = e.pageX
@@ -32,21 +40,25 @@ function WorkspacePage() {
setLineWidth(width)
}
}
-
+ useEffect(() => {
+ if (Notification.permission !== 'denied') {
+ Notification.requestPermission()
+ }
+ }, [])
const switching = () => {
switch (channelId) {
case 'threads':
- return ConstructionPage()
+ return ConstructionPage(100 - sideBarWidth)
case 'all-dms':
- return ConstructionPage()
+ return ConstructionPage(100 - sideBarWidth)
case 'saved-page':
- return ConstructionPage()
+ return ConstructionPage(100 - sideBarWidth)
case 'activity-page':
- return ConstructionPage()
+ return ConstructionPage(100 - sideBarWidth)
case 'more':
- return ConstructionPage()
+ return ConstructionPage(100 - sideBarWidth)
default:
- return
+ return
}
}
@@ -57,28 +69,29 @@ function WorkspacePage() {
-
+
- throttle(moveLine(e), 100)} />
+
{switching()}
-
-
-
-
+
+
)
}
-const ConstructionPage = () => {
+const ConstructionPage = SideBarWidth => {
return (
-
+
@@ -88,8 +101,7 @@ const ConstructionPage = () => {
}
const PageStyle = styled.div`
- width: 100vw;
- height: 100vh;
+ height: 100%;
display: flex;
flex-direction: column;
`
@@ -120,6 +132,7 @@ const ChannelListHeaderArea = styled.div`
background: ${COLOR.BACKGROUND_CHANNEL_LIST};
color: ${COLOR.LABEL_DEFAULT_TEXT};
border: 1px solid rgba(255, 255, 255, 0.1);
+ box-sizing: border-box;
`
const ChannelListArea = styled.div`
@@ -168,7 +181,7 @@ const ContentsArea = styled.div`
`
const SwitchContentsArea = styled.div`
height: 100%;
- width: 70%;
+ width: ${props => props.width}%;
font-size: 20px;
color: ${COLOR.LABEL_DEFAULT_TEXT};
display: flex;
@@ -179,27 +192,4 @@ const SwitchContentsArea = styled.div`
background: ${COLOR.BACKGROUND_CONTENTS};
`
-const SideBarArea = styled.div`
- display: flex;
- flex-direction: column;
- width: 30%;
- background: ${COLOR.BACKGROUND_CONTENTS};
- border: 1px solid rgba(255, 255, 255, 0.1);
-`
-
-const SideBarHeader = styled.div`
- display: flex;
- width: 100%;
- height: 60px;
- border: 1px solid rgba(255, 255, 255, 0.1);
- border-right: 0;
-`
-
-const SideBarContents = styled.div`
- width: 100%;
- height: calc(100% - 60px);
- border: 1px solid rgba(255, 255, 255, 0.1);
- border-right: 0;
-`
-
export default WorkspacePage
diff --git a/frontend/src/page/createWorkspace/CreateWorkspace.js b/frontend/src/page/createWorkspace/CreateWorkspace.js
index 17ddaf4b..ff1ad332 100644
--- a/frontend/src/page/createWorkspace/CreateWorkspace.js
+++ b/frontend/src/page/createWorkspace/CreateWorkspace.js
@@ -1,7 +1,7 @@
import React, { useState } from 'react'
import styled from 'styled-components'
-import CreateWorkspacecName from '../../organism/CreateWorkspaceName'
-import CreateWorkspaceInitChannel from '../../organism/CreateWorkspaceInitChannel'
+import CreateWorkspacecName from '../../container/CreateWorkspaceName'
+import CreateWorkspaceInitChannel from '../../container/CreateWorkspaceInitChannel'
const CreateWorkspace = () => {
const [workspaceName, setWorkspaceName] = useState('')
diff --git a/frontend/src/page/login/Login.js b/frontend/src/page/login/Login.js
index 6861aeb5..ff7b8af7 100644
--- a/frontend/src/page/login/Login.js
+++ b/frontend/src/page/login/Login.js
@@ -1,19 +1,29 @@
-import React from 'react'
+import React, { useEffect } from 'react'
import { useHistory } from 'react-router-dom'
-import LoginButton from '../../atom/LoginButton/LoginButton'
+import LoginButton from '../../presenter/LoginButton/LoginButton'
import { GITHUB } from '../../constant/icon'
-import Icon from '../../atom/Icon'
+import Icon from '../../presenter/Icon'
import styled from 'styled-components'
-import SlackIcon from '../../atom/SlackImage'
+import SlackIcon from '../../presenter/SlackImage'
+import { isEmpty } from '../../util'
+import QueryString from 'qs'
const baseURL =
process.env.NODE_ENV === 'development'
? process.env.REACT_APP_DEV_API_URL
: process.env.REACT_APP_API_URL
-const LoginPage = () => {
+const LoginPage = props => {
const history = useHistory()
const githubIcon =
+ const query = QueryString.parse(props.location.search, {
+ ignoreQueryPrefix: true,
+ })
+ useEffect(() => {
+ if (!isEmpty(query.invitecode)) {
+ localStorage.setItem('invitecode', query.invitecode)
+ }
+ }, [])
const gohomeHandle = () => {
history.push('/')
diff --git a/frontend/src/page/selectWorkspace/SelectWorkspace.js b/frontend/src/page/selectWorkspace/SelectWorkspace.js
index bd0ab7fe..53771a42 100644
--- a/frontend/src/page/selectWorkspace/SelectWorkspace.js
+++ b/frontend/src/page/selectWorkspace/SelectWorkspace.js
@@ -1,7 +1,7 @@
import React from 'react'
import styled from 'styled-components'
-import NewWorkspaceSection from '../../organism/NewWorkspaceSection'
-import MyWorkspaceSection from '../../organism/MyWorkspaceSection'
+import NewWorkspaceSection from '../../presenter/NewWorkspaceSection'
+import MyWorkspaceSection from '../../container/MyWorkspaceSection'
const SelectWorkspace = () => {
return (
diff --git a/frontend/src/atom/Button/AddButton/AddButton.js b/frontend/src/presenter/Button/AddButton/AddButton.js
similarity index 100%
rename from frontend/src/atom/Button/AddButton/AddButton.js
rename to frontend/src/presenter/Button/AddButton/AddButton.js
diff --git a/frontend/src/atom/Button/AddButton/Addbutton.stories.js b/frontend/src/presenter/Button/AddButton/Addbutton.stories.js
similarity index 100%
rename from frontend/src/atom/Button/AddButton/Addbutton.stories.js
rename to frontend/src/presenter/Button/AddButton/Addbutton.stories.js
diff --git a/frontend/src/atom/Button/AddButton/index.js b/frontend/src/presenter/Button/AddButton/index.js
similarity index 100%
rename from frontend/src/atom/Button/AddButton/index.js
rename to frontend/src/presenter/Button/AddButton/index.js
diff --git a/frontend/src/atom/Button/Button.js b/frontend/src/presenter/Button/Button.js
similarity index 95%
rename from frontend/src/atom/Button/Button.js
rename to frontend/src/presenter/Button/Button.js
index cb404bfb..487289e9 100644
--- a/frontend/src/atom/Button/Button.js
+++ b/frontend/src/presenter/Button/Button.js
@@ -31,6 +31,7 @@ const StyledButton = styled.button`
color: ${({ type, disabled }) => {
if (disabled) return COLOR.GRAY
if (type === 'transparent') return COLOR.GRAY
+ if (type === 'leave') return COLOR.WHITE
return COLOR.WHITE
}};
cursor: ${({ disabled }) => (disabled ? 'default' : 'pointer')};
@@ -38,6 +39,7 @@ const StyledButton = styled.button`
if (disabled) return COLOR.LIGHT_GRAY
if (type === 'transparent') return 'transparent'
if (type === 'icon') return 'transparent'
+ if (type === 'leave') return '#D91D57'
return COLOR.GREEN
}};
border: ${({ type }) => {
diff --git a/frontend/src/atom/Button/Button.stories.js b/frontend/src/presenter/Button/Button.stories.js
similarity index 100%
rename from frontend/src/atom/Button/Button.stories.js
rename to frontend/src/presenter/Button/Button.stories.js
diff --git a/frontend/src/atom/Button/ToggleButton/ToggleButton.js b/frontend/src/presenter/Button/ToggleButton/ToggleButton.js
similarity index 100%
rename from frontend/src/atom/Button/ToggleButton/ToggleButton.js
rename to frontend/src/presenter/Button/ToggleButton/ToggleButton.js
diff --git a/frontend/src/atom/Button/ToggleButton/ToggleButton.stories.js b/frontend/src/presenter/Button/ToggleButton/ToggleButton.stories.js
similarity index 100%
rename from frontend/src/atom/Button/ToggleButton/ToggleButton.stories.js
rename to frontend/src/presenter/Button/ToggleButton/ToggleButton.stories.js
diff --git a/frontend/src/atom/Button/ToggleButton/index.js b/frontend/src/presenter/Button/ToggleButton/index.js
similarity index 100%
rename from frontend/src/atom/Button/ToggleButton/index.js
rename to frontend/src/presenter/Button/ToggleButton/index.js
diff --git a/frontend/src/presenter/Button/ViewThreadButton/ViewThreadButton.js b/frontend/src/presenter/Button/ViewThreadButton/ViewThreadButton.js
new file mode 100644
index 00000000..002baa0e
--- /dev/null
+++ b/frontend/src/presenter/Button/ViewThreadButton/ViewThreadButton.js
@@ -0,0 +1,45 @@
+import React, { memo } from 'react'
+import styled from 'styled-components'
+import UserProfileImg from '../../UserProfileImg'
+import calculateTime from '../../../util/calculateTime'
+import { go, Lazy, take, map } from '../../../util/fx'
+import { COLOR } from '../../../constant/style'
+const MAX_NUMBER_OF_PROFILES = 5
+const SMALL_SIZE = 24
+const ViewThreadButton = memo(({ reply = [] }) => {
+ const [lastReply] = reply.slice(-1)
+ return (
+
+ {go(
+ reply,
+ Lazy.map(item => item?.userInfo?.profileUrl),
+ Lazy.takeNoneDuplicate,
+ take(MAX_NUMBER_OF_PROFILES),
+ map((item, index) => (
+
+ )),
+ )}
+
+ {reply.length} {reply.length === 1 ? 'reply ' : 'replies '}
+
+ {calculateTime(lastReply?.createdAt)}
+
+
+
+ )
+})
+
+const ViewThreadContainer = styled.div`
+ display: flex;
+`
+const ReplyCounts = styled.div`
+ margin-left: 5px;
+`
+const LastModifiedTime = styled.span`
+ color: ${COLOR.GRAY};
+`
+export default ViewThreadButton
diff --git a/frontend/src/presenter/Button/ViewThreadButton/ViewThreadButton.stories.js b/frontend/src/presenter/Button/ViewThreadButton/ViewThreadButton.stories.js
new file mode 100644
index 00000000..5100dd36
--- /dev/null
+++ b/frontend/src/presenter/Button/ViewThreadButton/ViewThreadButton.stories.js
@@ -0,0 +1,29 @@
+import React from 'react'
+import ViewThreadButton from './ViewThreadButton'
+
+export default {
+ title: 'Presenter/Button/ViewThreadButton',
+ component: ViewThreadButton,
+}
+
+const Template = args =>
+
+export const Default = Template.bind({})
+Default.args = {
+ reply: [
+ {
+ createdAt: '2020-12-15T04:08:39.960Z',
+ creator: '5fcf09b2bc3a524ae4db6035',
+ isDelete: false,
+ updatedAt: '2020-12-15T04:08:39.960Z',
+ userInfo: {
+ _id: '5fcf09b2bc3a524ae4db6035',
+ displayName: 'solo95',
+ profileUrl:
+ 'https://avatars0.githubusercontent.com/u/26921508?…00&u=3bd5e08ac086212ee3219297d4e02e10a5e275a5&v=4',
+ },
+ __v: 0,
+ _id: '5fd836c752de571e30405e09',
+ },
+ ],
+}
diff --git a/frontend/src/presenter/Button/ViewThreadButton/index.js b/frontend/src/presenter/Button/ViewThreadButton/index.js
new file mode 100644
index 00000000..daef7cb0
--- /dev/null
+++ b/frontend/src/presenter/Button/ViewThreadButton/index.js
@@ -0,0 +1 @@
+export { default } from './ViewThreadButton'
diff --git a/frontend/src/atom/Button/index.js b/frontend/src/presenter/Button/index.js
similarity index 100%
rename from frontend/src/atom/Button/index.js
rename to frontend/src/presenter/Button/index.js
diff --git a/frontend/src/presenter/ChannelBrowserCard/ChannelBrowserCard.js b/frontend/src/presenter/ChannelBrowserCard/ChannelBrowserCard.js
new file mode 100644
index 00000000..218eb3f2
--- /dev/null
+++ b/frontend/src/presenter/ChannelBrowserCard/ChannelBrowserCard.js
@@ -0,0 +1,83 @@
+import React from 'react'
+import styled from 'styled-components'
+import Button from '../../presenter/Button'
+import { useHistory, useParams } from 'react-router'
+import { leaveChannel, joinChannel } from '../../api/channel'
+import useChannelList from '../../hooks/useChannelList'
+import useWorkspace from '../../hooks/useWorkspace'
+
+function ChannelBrowserCard({
+ _id,
+ title,
+ joined,
+ channelType,
+ handleClose,
+ workspaceUserInfoId,
+}) {
+ const { workspaceId, channelId } = useParams()
+ const [channelList, setChannels] = useChannelList()
+ const [workspaceUserInfo] = useWorkspace()
+ const history = useHistory()
+
+ const defaultChannel = workspaceUserInfo.workspaceInfo.default_channel
+
+ const clickEvent = async () => {
+ if (joined) {
+ await leaveChannel({
+ workspaceUserInfoId,
+ channelId: _id,
+ })
+ if (channelId === _id) {
+ history.push(`/workspace/${workspaceId}/${defaultChannel}`)
+ }
+ } else {
+ await joinChannel({
+ workspaceUserInfoId,
+ channelId: _id,
+ })
+ }
+
+ setChannels()
+ handleClose()
+ }
+
+ return (
+
+ {title}
+
+
+
+
+ )
+}
+
+const ChannelBrowserCardStyle = styled.div`
+ width: auto;
+ height: 50px;
+ border-bottom: 1px solid gray;
+ padding: 10px 30px;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+`
+
+const ContentsArea = styled.div`
+ font-size: 20px;
+`
+const ButtonArea = styled.div``
+
+export default ChannelBrowserCard
diff --git a/frontend/src/presenter/ChannelBrowserCard/index.js b/frontend/src/presenter/ChannelBrowserCard/index.js
new file mode 100644
index 00000000..bddf6fb7
--- /dev/null
+++ b/frontend/src/presenter/ChannelBrowserCard/index.js
@@ -0,0 +1 @@
+export { default } from './ChannelBrowserCard'
diff --git a/frontend/src/atom/ChannelCard/ChannelCard.js b/frontend/src/presenter/ChannelCard/ChannelCard.js
similarity index 96%
rename from frontend/src/atom/ChannelCard/ChannelCard.js
rename to frontend/src/presenter/ChannelCard/ChannelCard.js
index a0f97764..2dd252b7 100644
--- a/frontend/src/atom/ChannelCard/ChannelCard.js
+++ b/frontend/src/presenter/ChannelCard/ChannelCard.js
@@ -19,7 +19,7 @@ function ChannelCard(props) {
/>
- {props.channel.channelType == 2
+ {props.channel.channelType === 2
? dmTitleGenerator(props.member)
: title}
diff --git a/frontend/src/atom/ChannelCard/ChannelCard.stories.js b/frontend/src/presenter/ChannelCard/ChannelCard.stories.js
similarity index 100%
rename from frontend/src/atom/ChannelCard/ChannelCard.stories.js
rename to frontend/src/presenter/ChannelCard/ChannelCard.stories.js
diff --git a/frontend/src/atom/ChannelCard/index.js b/frontend/src/presenter/ChannelCard/index.js
similarity index 100%
rename from frontend/src/atom/ChannelCard/index.js
rename to frontend/src/presenter/ChannelCard/index.js
diff --git a/frontend/src/atom/ChannelListHeader/ChannelListHeader.js b/frontend/src/presenter/ChannelListHeader/ChannelListHeader.js
similarity index 87%
rename from frontend/src/atom/ChannelListHeader/ChannelListHeader.js
rename to frontend/src/presenter/ChannelListHeader/ChannelListHeader.js
index 82fe9325..1b4d95ee 100644
--- a/frontend/src/atom/ChannelListHeader/ChannelListHeader.js
+++ b/frontend/src/presenter/ChannelListHeader/ChannelListHeader.js
@@ -1,16 +1,12 @@
import React from 'react'
-import { useRecoilValue } from 'recoil'
import styled from 'styled-components'
-import { workspaceRecoil } from '../../store'
-import Icon from '../../atom/Icon'
+import Icon from '../Icon'
import { EDIT, CHEVRONDOWN } from '../../constant/icon'
const ICON_SIZE = 13
const ICON_COLOR = '#19181F'
-function ChannelListHeader() {
- const workspaceUserInfo = useRecoilValue(workspaceRecoil)
-
+function ChannelListHeader({ workspaceUserInfo }) {
return workspaceUserInfo !== null ? (
diff --git a/frontend/src/atom/ChannelListHeader/index.js b/frontend/src/presenter/ChannelListHeader/index.js
similarity index 100%
rename from frontend/src/atom/ChannelListHeader/index.js
rename to frontend/src/presenter/ChannelListHeader/index.js
diff --git a/frontend/src/atom/ChannelMemberThumbnail/ChannelMemberThumbnail.js b/frontend/src/presenter/ChannelMemberThumbnail/ChannelMemberThumbnail.js
similarity index 100%
rename from frontend/src/atom/ChannelMemberThumbnail/ChannelMemberThumbnail.js
rename to frontend/src/presenter/ChannelMemberThumbnail/ChannelMemberThumbnail.js
diff --git a/frontend/src/atom/ChannelMemberThumbnail/index.js b/frontend/src/presenter/ChannelMemberThumbnail/index.js
similarity index 100%
rename from frontend/src/atom/ChannelMemberThumbnail/index.js
rename to frontend/src/presenter/ChannelMemberThumbnail/index.js
diff --git a/frontend/src/atom/ChannelPinBtn/ChannelPinBtn.js b/frontend/src/presenter/ChannelPinBtn/ChannelPinBtn.js
similarity index 100%
rename from frontend/src/atom/ChannelPinBtn/ChannelPinBtn.js
rename to frontend/src/presenter/ChannelPinBtn/ChannelPinBtn.js
diff --git a/frontend/src/atom/ChannelPinBtn/index.js b/frontend/src/presenter/ChannelPinBtn/index.js
similarity index 100%
rename from frontend/src/atom/ChannelPinBtn/index.js
rename to frontend/src/presenter/ChannelPinBtn/index.js
diff --git a/frontend/src/atom/ChannelTopicBtn/ChannelTopicBtn.js b/frontend/src/presenter/ChannelTopicBtn/ChannelTopicBtn.js
similarity index 100%
rename from frontend/src/atom/ChannelTopicBtn/ChannelTopicBtn.js
rename to frontend/src/presenter/ChannelTopicBtn/ChannelTopicBtn.js
diff --git a/frontend/src/atom/ChannelTopicBtn/index.js b/frontend/src/presenter/ChannelTopicBtn/index.js
similarity index 100%
rename from frontend/src/atom/ChannelTopicBtn/index.js
rename to frontend/src/presenter/ChannelTopicBtn/index.js
diff --git a/frontend/src/presenter/ChatContent/ChatContent.js b/frontend/src/presenter/ChatContent/ChatContent.js
new file mode 100644
index 00000000..620be139
--- /dev/null
+++ b/frontend/src/presenter/ChatContent/ChatContent.js
@@ -0,0 +1,65 @@
+import React, { memo } from 'react'
+import styled from 'styled-components'
+import { COLOR } from '../../constant/style'
+import calculateTime from '../../util/calculateTime'
+
+const ChatContent = memo(
+ ({ displayName, createdAt, contents, handleProfileModal, fileContents }) => {
+ return (
+
+
+
+ {displayName}
+
+
+ {calculateTime(createdAt)}
+
+
+
+ {contents}
+ {fileContents}
+
+
+ )
+ },
+)
+const StyledChatContent = styled.div`
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+
+ margin-left: 15px;
+`
+const ChatHeader = styled.div`
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: center;
+`
+
+const StyledDate = styled.span`
+ color: ${COLOR.GRAY};
+ font-size: 12px;
+`
+const StyledUserName = styled.div`
+ display: inline-block;
+ font-size: 15px;
+ line-height: 1.46668;
+ font-weight: 900;
+ word-break: break-word;
+ margin-right: 5px;
+ &:hover {
+ cursor: pointer;
+ text-decoration: underline;
+ }
+`
+
+const ChatContentArea = styled.div`
+ display: contents;
+ word-break: break-all;
+`
+export default ChatContent
diff --git a/frontend/src/atom/ChatContent/index.js b/frontend/src/presenter/ChatContent/index.js
similarity index 100%
rename from frontend/src/atom/ChatContent/index.js
rename to frontend/src/presenter/ChatContent/index.js
diff --git a/frontend/src/atom/Description/Description.js b/frontend/src/presenter/Description/Description.js
similarity index 100%
rename from frontend/src/atom/Description/Description.js
rename to frontend/src/presenter/Description/Description.js
diff --git a/frontend/src/atom/Description/Description.stories.js b/frontend/src/presenter/Description/Description.stories.js
similarity index 100%
rename from frontend/src/atom/Description/Description.stories.js
rename to frontend/src/presenter/Description/Description.stories.js
diff --git a/frontend/src/atom/Description/index.js b/frontend/src/presenter/Description/index.js
similarity index 100%
rename from frontend/src/atom/Description/index.js
rename to frontend/src/presenter/Description/index.js
diff --git a/frontend/src/atom/DirectMessageCard/DirectMessageCard.js b/frontend/src/presenter/DirectMessageCard/DirectMessageCard.js
similarity index 100%
rename from frontend/src/atom/DirectMessageCard/DirectMessageCard.js
rename to frontend/src/presenter/DirectMessageCard/DirectMessageCard.js
diff --git a/frontend/src/atom/DirectMessageCard/DirectMessageCard.stories.js b/frontend/src/presenter/DirectMessageCard/DirectMessageCard.stories.js
similarity index 100%
rename from frontend/src/atom/DirectMessageCard/DirectMessageCard.stories.js
rename to frontend/src/presenter/DirectMessageCard/DirectMessageCard.stories.js
diff --git a/frontend/src/atom/DirectMessageCard/index.js b/frontend/src/presenter/DirectMessageCard/index.js
similarity index 100%
rename from frontend/src/atom/DirectMessageCard/index.js
rename to frontend/src/presenter/DirectMessageCard/index.js
diff --git a/frontend/src/atom/EmojiModal/EmojiModal.js b/frontend/src/presenter/EmojiModal/EmojiModal.js
similarity index 95%
rename from frontend/src/atom/EmojiModal/EmojiModal.js
rename to frontend/src/presenter/EmojiModal/EmojiModal.js
index 57d51b4b..91533ff3 100644
--- a/frontend/src/atom/EmojiModal/EmojiModal.js
+++ b/frontend/src/presenter/EmojiModal/EmojiModal.js
@@ -6,7 +6,7 @@ import { SIZE } from '../../constant/style'
function EmojiModal({ sendHandler, closeHandler, axisX, axisY }) {
const addEmoji = emoji => {
- if (emoji !== null) sendHandler(emoji)
+ if (emoji !== null) sendHandler(emoji.native)
closeHandler()
}
const stopPropagation = e => {
diff --git a/frontend/src/atom/EmojiModal/index.js b/frontend/src/presenter/EmojiModal/index.js
similarity index 100%
rename from frontend/src/atom/EmojiModal/index.js
rename to frontend/src/presenter/EmojiModal/index.js
diff --git a/frontend/src/presenter/GlobalStyle/GlobalStyle.js b/frontend/src/presenter/GlobalStyle/GlobalStyle.js
new file mode 100644
index 00000000..a0534955
--- /dev/null
+++ b/frontend/src/presenter/GlobalStyle/GlobalStyle.js
@@ -0,0 +1,34 @@
+import { createGlobalStyle } from 'styled-components'
+
+const GlobalStyle = createGlobalStyle`
+ html{
+ height: 100%;
+ }
+ body {
+ padding: 0px;
+ margin: 0px;
+ height: 100%;
+ width: 100%;
+ scrollbar-width: thin;
+ scrollbar-color: gray transparent;
+ }
+ #root{
+ height:100%;
+ }
+ ::-webkit-scrollbar{
+ width: 6px;
+ }
+ ::-webkit-scrollbar-track-piece{
+ background-color: transparent;
+ }
+ ::-webkit-scrollbar-thumb{
+ border-radius: 3px;
+ background-color: gray;
+ }
+ ::-webkit-scrollbar-button{
+ width:0;
+ height:0;
+ }
+`
+
+export default GlobalStyle
diff --git a/frontend/src/atom/GlobalStyle/index.js b/frontend/src/presenter/GlobalStyle/index.js
similarity index 100%
rename from frontend/src/atom/GlobalStyle/index.js
rename to frontend/src/presenter/GlobalStyle/index.js
diff --git a/frontend/src/atom/Icon/Icon.js b/frontend/src/presenter/Icon/Icon.js
similarity index 100%
rename from frontend/src/atom/Icon/Icon.js
rename to frontend/src/presenter/Icon/Icon.js
diff --git a/frontend/src/atom/Icon/Icon.stories.js b/frontend/src/presenter/Icon/Icon.stories.js
similarity index 100%
rename from frontend/src/atom/Icon/Icon.stories.js
rename to frontend/src/presenter/Icon/Icon.stories.js
diff --git a/frontend/src/atom/Icon/index.js b/frontend/src/presenter/Icon/index.js
similarity index 100%
rename from frontend/src/atom/Icon/index.js
rename to frontend/src/presenter/Icon/index.js
diff --git a/frontend/src/atom/Input/Input.js b/frontend/src/presenter/Input/Input.js
similarity index 65%
rename from frontend/src/atom/Input/Input.js
rename to frontend/src/presenter/Input/Input.js
index 226539e2..67044608 100644
--- a/frontend/src/atom/Input/Input.js
+++ b/frontend/src/presenter/Input/Input.js
@@ -8,9 +8,10 @@ function Input({
handleKey,
value,
maxLength,
+ type = 'default',
}) {
return (
-
+
{children}
div {
- display: block;
- }
- border: 1px solid ${COLOR.TRANSPARENT_GRAY};
- border-radius: 4px;
+ ${({ type }) => {
+ if (type === 'default')
+ return `
+ &:focus-within {
+ box-shadow: 0 0 0 1px rgba(18, 100, 163, 1),
+ 0 0 0 5px rgba(29, 155, 209, 0.3);
+ border-radius: 4px;
+ border-color: transparent;
+ }
+ &:focus-within > div {
+ display: block;
+ }
+ border: 1px solid ${COLOR.TRANSPARENT_GRAY};
+ border-radius: 4px;
+ `
+ }}
+ outline: none;
justify-content: space-between;
display: flex;
padding: 5px;
@@ -57,6 +63,7 @@ const StyledInput = styled.input`
width: 100%;
border: none;
outline: none;
+ background-color: inherit;
`
export default Input
diff --git a/frontend/src/atom/Input/Input.stories.js b/frontend/src/presenter/Input/Input.stories.js
similarity index 100%
rename from frontend/src/atom/Input/Input.stories.js
rename to frontend/src/presenter/Input/Input.stories.js
diff --git a/frontend/src/atom/Input/index.js b/frontend/src/presenter/Input/index.js
similarity index 100%
rename from frontend/src/atom/Input/index.js
rename to frontend/src/presenter/Input/index.js
diff --git a/frontend/src/atom/LoginButton/LoginButton.js b/frontend/src/presenter/LoginButton/LoginButton.js
similarity index 100%
rename from frontend/src/atom/LoginButton/LoginButton.js
rename to frontend/src/presenter/LoginButton/LoginButton.js
diff --git a/frontend/src/atom/LoginButton/LoginButton.stories.js b/frontend/src/presenter/LoginButton/LoginButton.stories.js
similarity index 100%
rename from frontend/src/atom/LoginButton/LoginButton.stories.js
rename to frontend/src/presenter/LoginButton/LoginButton.stories.js
diff --git a/frontend/src/atom/LoginButton/index.js b/frontend/src/presenter/LoginButton/index.js
similarity index 100%
rename from frontend/src/atom/LoginButton/index.js
rename to frontend/src/presenter/LoginButton/index.js
diff --git a/frontend/src/atom/MainDescription/MainDescription.js b/frontend/src/presenter/MainDescription/MainDescription.js
similarity index 100%
rename from frontend/src/atom/MainDescription/MainDescription.js
rename to frontend/src/presenter/MainDescription/MainDescription.js
diff --git a/frontend/src/atom/MainDescription/MainDescription.stories.js b/frontend/src/presenter/MainDescription/MainDescription.stories.js
similarity index 100%
rename from frontend/src/atom/MainDescription/MainDescription.stories.js
rename to frontend/src/presenter/MainDescription/MainDescription.stories.js
diff --git a/frontend/src/atom/MainDescription/index.js b/frontend/src/presenter/MainDescription/index.js
similarity index 100%
rename from frontend/src/atom/MainDescription/index.js
rename to frontend/src/presenter/MainDescription/index.js
diff --git a/frontend/src/atom/Modal/Modal.js b/frontend/src/presenter/Modal/Modal.js
similarity index 100%
rename from frontend/src/atom/Modal/Modal.js
rename to frontend/src/presenter/Modal/Modal.js
diff --git a/frontend/src/atom/Modal/index.js b/frontend/src/presenter/Modal/index.js
similarity index 100%
rename from frontend/src/atom/Modal/index.js
rename to frontend/src/presenter/Modal/index.js
diff --git a/frontend/src/organism/ModalInputSection/ModalInputSection.js b/frontend/src/presenter/ModalInputSection/ModalInputSection.js
similarity index 100%
rename from frontend/src/organism/ModalInputSection/ModalInputSection.js
rename to frontend/src/presenter/ModalInputSection/ModalInputSection.js
diff --git a/frontend/src/organism/ModalInputSection/ModalInputSection.stories.js b/frontend/src/presenter/ModalInputSection/ModalInputSection.stories.js
similarity index 88%
rename from frontend/src/organism/ModalInputSection/ModalInputSection.stories.js
rename to frontend/src/presenter/ModalInputSection/ModalInputSection.stories.js
index 21964e6a..3098370a 100644
--- a/frontend/src/organism/ModalInputSection/ModalInputSection.stories.js
+++ b/frontend/src/presenter/ModalInputSection/ModalInputSection.stories.js
@@ -1,8 +1,8 @@
import React from 'react'
import ModalInputSection from './ModalInputSection'
-import Input from '../../atom/Input'
+import Input from '../Input'
import { action } from '@storybook/addon-actions'
-import Icon from '../../atom/Icon'
+import Icon from '../Icon'
import { HASHTAG } from '../../constant/icon'
export default {
title: 'Organism/Modal/ModalInputSection',
diff --git a/frontend/src/organism/ModalInputSection/index.js b/frontend/src/presenter/ModalInputSection/index.js
similarity index 100%
rename from frontend/src/organism/ModalInputSection/index.js
rename to frontend/src/presenter/ModalInputSection/index.js
diff --git a/frontend/src/organism/MyWorkspace/MyWorkspace.js b/frontend/src/presenter/MyWorkspace/MyWorkspace.js
similarity index 88%
rename from frontend/src/organism/MyWorkspace/MyWorkspace.js
rename to frontend/src/presenter/MyWorkspace/MyWorkspace.js
index 02123663..66685664 100644
--- a/frontend/src/organism/MyWorkspace/MyWorkspace.js
+++ b/frontend/src/presenter/MyWorkspace/MyWorkspace.js
@@ -1,9 +1,9 @@
import React from 'react'
-import Icon from '../../atom/Icon'
+import Icon from '../Icon'
import { ADDRESSBOOK } from '../../constant/icon'
import styled from 'styled-components'
-import MainDescription from '../../atom/MainDescription'
-import Button from '../../atom/Button'
+import MainDescription from '../MainDescription'
+import Button from '../Button'
import { COLOR } from '../../constant/style'
import { useHistory } from 'react-router-dom'
diff --git a/frontend/src/organism/MyWorkspace/MyWorkspace.stories.js b/frontend/src/presenter/MyWorkspace/MyWorkspace.stories.js
similarity index 100%
rename from frontend/src/organism/MyWorkspace/MyWorkspace.stories.js
rename to frontend/src/presenter/MyWorkspace/MyWorkspace.stories.js
diff --git a/frontend/src/organism/MyWorkspace/index.js b/frontend/src/presenter/MyWorkspace/index.js
similarity index 100%
rename from frontend/src/organism/MyWorkspace/index.js
rename to frontend/src/presenter/MyWorkspace/index.js
diff --git a/frontend/src/organism/NewWorkspaceSection/NewWorkspaceSection.js b/frontend/src/presenter/NewWorkspaceSection/NewWorkspaceSection.js
similarity index 76%
rename from frontend/src/organism/NewWorkspaceSection/NewWorkspaceSection.js
rename to frontend/src/presenter/NewWorkspaceSection/NewWorkspaceSection.js
index d62015e7..a24423c7 100644
--- a/frontend/src/organism/NewWorkspaceSection/NewWorkspaceSection.js
+++ b/frontend/src/presenter/NewWorkspaceSection/NewWorkspaceSection.js
@@ -1,11 +1,11 @@
import React from 'react'
import { useHistory } from 'react-router-dom'
import styled from 'styled-components'
-import Button from '../../atom/Button'
-import Description from '../../atom/Description/Description'
-import MainDescription from '../../atom/MainDescription/MainDescription'
+import Button from '../Button'
+import Description from '../Description/Description'
+import MainDescription from '../MainDescription/MainDescription'
-const NewWorkspaceSection = ({ handler }) => {
+const NewWorkspaceSection = () => {
const history = useHistory()
return (
<>
diff --git a/frontend/src/organism/NewWorkspaceSection/NewWorkspaceSection.stories.js b/frontend/src/presenter/NewWorkspaceSection/NewWorkspaceSection.stories.js
similarity index 100%
rename from frontend/src/organism/NewWorkspaceSection/NewWorkspaceSection.stories.js
rename to frontend/src/presenter/NewWorkspaceSection/NewWorkspaceSection.stories.js
diff --git a/frontend/src/organism/NewWorkspaceSection/index.js b/frontend/src/presenter/NewWorkspaceSection/index.js
similarity index 100%
rename from frontend/src/organism/NewWorkspaceSection/index.js
rename to frontend/src/presenter/NewWorkspaceSection/index.js
diff --git a/frontend/src/organism/SearchUserList/SearchUserList.js b/frontend/src/presenter/SearchUserList/SearchUserList.js
similarity index 94%
rename from frontend/src/organism/SearchUserList/SearchUserList.js
rename to frontend/src/presenter/SearchUserList/SearchUserList.js
index 312dbd7c..a2d27079 100644
--- a/frontend/src/organism/SearchUserList/SearchUserList.js
+++ b/frontend/src/presenter/SearchUserList/SearchUserList.js
@@ -1,6 +1,6 @@
import React from 'react'
import styled from 'styled-components'
-import SearchUserCard from '../../atom/SearchUserCard'
+import SearchUserCard from '../../container/SearchUserCard'
import { COLOR } from '../../constant/style'
function SearchUserList({ searchResult, state, setState }) {
diff --git a/frontend/src/organism/SearchUserList/index.js b/frontend/src/presenter/SearchUserList/index.js
similarity index 100%
rename from frontend/src/organism/SearchUserList/index.js
rename to frontend/src/presenter/SearchUserList/index.js
diff --git a/frontend/src/atom/SelectedUserCard/SelectedUserCard.js b/frontend/src/presenter/SelectedUserCard/SelectedUserCard.js
similarity index 100%
rename from frontend/src/atom/SelectedUserCard/SelectedUserCard.js
rename to frontend/src/presenter/SelectedUserCard/SelectedUserCard.js
diff --git a/frontend/src/atom/SelectedUserCard/index.js b/frontend/src/presenter/SelectedUserCard/index.js
similarity index 100%
rename from frontend/src/atom/SelectedUserCard/index.js
rename to frontend/src/presenter/SelectedUserCard/index.js
diff --git a/frontend/src/organism/SelectedUserList/SelectedUserList.js b/frontend/src/presenter/SelectedUserList/SelectedUserList.js
similarity index 92%
rename from frontend/src/organism/SelectedUserList/SelectedUserList.js
rename to frontend/src/presenter/SelectedUserList/SelectedUserList.js
index 09be345a..672bb445 100644
--- a/frontend/src/organism/SelectedUserList/SelectedUserList.js
+++ b/frontend/src/presenter/SelectedUserList/SelectedUserList.js
@@ -1,6 +1,6 @@
import React from 'react'
import styled from 'styled-components'
-import SelectedUserCard from '../../atom/SelectedUserCard'
+import SelectedUserCard from '../SelectedUserCard'
function SelectedUserList({ inviteUserList, setInviteUserList }) {
const renderSelectedUserList =
diff --git a/frontend/src/organism/SelectedUserList/index.js b/frontend/src/presenter/SelectedUserList/index.js
similarity index 100%
rename from frontend/src/organism/SelectedUserList/index.js
rename to frontend/src/presenter/SelectedUserList/index.js
diff --git a/frontend/src/atom/SideMenuCard/SideMenuCard.js b/frontend/src/presenter/SideMenuCard/SideMenuCard.js
similarity index 75%
rename from frontend/src/atom/SideMenuCard/SideMenuCard.js
rename to frontend/src/presenter/SideMenuCard/SideMenuCard.js
index 5cee8645..d02b3aae 100644
--- a/frontend/src/atom/SideMenuCard/SideMenuCard.js
+++ b/frontend/src/presenter/SideMenuCard/SideMenuCard.js
@@ -1,28 +1,21 @@
-import React, { useState, useEffect } from 'react'
+import React from 'react'
import { useParams } from 'react-router'
import { Link } from 'react-router-dom'
import styled from 'styled-components'
import Icon from '../Icon'
-function SideMenuCard({ icon, color, children, linkUrl }) {
+function SideMenuCard({ icon, children, linkUrl }) {
const parameters = useParams()
- const [currentChannel, setCurrentChannel] = useState(false)
-
- useEffect(() => {
- if (parameters.channelId === linkUrl) {
- setCurrentChannel(true)
- } else {
- setCurrentChannel(false)
- }
- }, [parameters])
-
return (
-
+
-
+
-
+ {children}
diff --git a/frontend/src/atom/SideMenuCard/index.js b/frontend/src/presenter/SideMenuCard/index.js
similarity index 100%
rename from frontend/src/atom/SideMenuCard/index.js
rename to frontend/src/presenter/SideMenuCard/index.js
diff --git a/frontend/src/organism/SideMenuList/SideMenuList.js b/frontend/src/presenter/SideMenuList/SideMenuList.js
similarity index 94%
rename from frontend/src/organism/SideMenuList/SideMenuList.js
rename to frontend/src/presenter/SideMenuList/SideMenuList.js
index 1149b966..f7d0d47e 100644
--- a/frontend/src/organism/SideMenuList/SideMenuList.js
+++ b/frontend/src/presenter/SideMenuList/SideMenuList.js
@@ -1,6 +1,6 @@
import React from 'react'
import styled from 'styled-components'
-import SideMenuCard from '../../atom/SideMenuCard'
+import SideMenuCard from '../SideMenuCard'
import {
COMMENTDOTS,
COMMENTS,
diff --git a/frontend/src/organism/SideMenuList/index.js b/frontend/src/presenter/SideMenuList/index.js
similarity index 100%
rename from frontend/src/organism/SideMenuList/index.js
rename to frontend/src/presenter/SideMenuList/index.js
diff --git a/frontend/src/atom/SlackImage/SlackImage.js b/frontend/src/presenter/SlackImage/SlackImage.js
similarity index 100%
rename from frontend/src/atom/SlackImage/SlackImage.js
rename to frontend/src/presenter/SlackImage/SlackImage.js
diff --git a/frontend/src/atom/SlackImage/SlackImage.stories.js b/frontend/src/presenter/SlackImage/SlackImage.stories.js
similarity index 100%
rename from frontend/src/atom/SlackImage/SlackImage.stories.js
rename to frontend/src/presenter/SlackImage/SlackImage.stories.js
diff --git a/frontend/src/atom/SlackImage/index.js b/frontend/src/presenter/SlackImage/index.js
similarity index 100%
rename from frontend/src/atom/SlackImage/index.js
rename to frontend/src/presenter/SlackImage/index.js
diff --git a/frontend/src/atom/ThreadReactionCard/ThreadReactionCard.js b/frontend/src/presenter/ThreadReactionCard/ThreadReactionCard.js
similarity index 61%
rename from frontend/src/atom/ThreadReactionCard/ThreadReactionCard.js
rename to frontend/src/presenter/ThreadReactionCard/ThreadReactionCard.js
index fbc3f650..aec61b17 100644
--- a/frontend/src/atom/ThreadReactionCard/ThreadReactionCard.js
+++ b/frontend/src/presenter/ThreadReactionCard/ThreadReactionCard.js
@@ -1,38 +1,13 @@
-import React, { useState, useEffect } from 'react'
+import React from 'react'
import styled from 'styled-components'
-import { useRecoilState } from 'recoil'
-import { workspaceRecoil } from '../../store'
import { COLOR } from '../../constant/style'
-function ThreadReactionCard({ reaction, chatId, updateReactionHandler }) {
- const [userInfo, setUserInfo] = useRecoilState(workspaceRecoil)
- const [myReaction, setMyReaction] = useState(false)
-
- useEffect(() => {
- setMyReaction(hasMyReaction())
- }, [reaction.users.length])
-
- const hasMyReaction = () => {
- if (reaction.users[0] === undefined) {
- reaction.set = false
- return false
- }
- const result = reaction.users.every(user => {
- return user?._id !== userInfo?._id
- })
- if (!result) {
- reaction.set = true
- } else {
- reaction.set = false
- }
- return !result
- }
-
+function ThreadReactionCard({ reaction, updateReactionHandler }) {
return (
reaction.users.length !== 0 && (
updateReactionHandler(reaction.emoji)}
- myReaction={myReaction}
+ myReaction={reaction.set}
>
{reaction.emoji}{reaction.users.length}
@@ -51,6 +26,7 @@ const ThreadReactionCardStyle = styled.div`
justify-content: space-around;
align-items: center;
border-radius: 20px;
+ cursor: pointer;
border: 1px solid
${props => {
return props.myReaction ? COLOR.REACTION_MINE_TEXT_AND_LINE : 'gray'
diff --git a/frontend/src/atom/ThreadReactionCard/index.js b/frontend/src/presenter/ThreadReactionCard/index.js
similarity index 100%
rename from frontend/src/atom/ThreadReactionCard/index.js
rename to frontend/src/presenter/ThreadReactionCard/index.js
diff --git a/frontend/src/organism/ThreadReactionList/ThreadReactionList.js b/frontend/src/presenter/ThreadReactionList/ThreadReactionList.js
similarity index 82%
rename from frontend/src/organism/ThreadReactionList/ThreadReactionList.js
rename to frontend/src/presenter/ThreadReactionList/ThreadReactionList.js
index d1c3bc85..fae879ce 100644
--- a/frontend/src/organism/ThreadReactionList/ThreadReactionList.js
+++ b/frontend/src/presenter/ThreadReactionList/ThreadReactionList.js
@@ -1,7 +1,7 @@
import React from 'react'
-import styled, { css } from 'styled-components'
-import ThreadReactionCard from '../../atom/ThreadReactionCard'
-import AddReactionButton from '../../atom/AddReactionButton'
+import styled from 'styled-components'
+import ThreadReactionCard from '../ThreadReactionCard'
+import AddReactionButton from '../../container/AddReactionButton'
function ThreadReactionList({ reactions, chatId, updateReactionHandler }) {
const renderReactionCard = reactions.map((reaction, idx) => {
@@ -36,6 +36,7 @@ const ThreadReactionListStyle = styled.div`
align-items: center;
padding: 0 10px;
border-radius: 5px;
+ cursor: pointer;
`
export default ThreadReactionList
diff --git a/frontend/src/organism/ThreadReactionList/index.js b/frontend/src/presenter/ThreadReactionList/index.js
similarity index 100%
rename from frontend/src/organism/ThreadReactionList/index.js
rename to frontend/src/presenter/ThreadReactionList/index.js
diff --git a/frontend/src/atom/Title/Title.js b/frontend/src/presenter/Title/Title.js
similarity index 100%
rename from frontend/src/atom/Title/Title.js
rename to frontend/src/presenter/Title/Title.js
diff --git a/frontend/src/atom/Title/Title.stories.js b/frontend/src/presenter/Title/Title.stories.js
similarity index 100%
rename from frontend/src/atom/Title/Title.stories.js
rename to frontend/src/presenter/Title/Title.stories.js
diff --git a/frontend/src/atom/Title/index.js b/frontend/src/presenter/Title/index.js
similarity index 100%
rename from frontend/src/atom/Title/index.js
rename to frontend/src/presenter/Title/index.js
diff --git a/frontend/src/atom/UserActive/UserActive.js b/frontend/src/presenter/UserActive/UserActive.js
similarity index 100%
rename from frontend/src/atom/UserActive/UserActive.js
rename to frontend/src/presenter/UserActive/UserActive.js
diff --git a/frontend/src/atom/UserActive/UserActive.stories.js b/frontend/src/presenter/UserActive/UserActive.stories.js
similarity index 100%
rename from frontend/src/atom/UserActive/UserActive.stories.js
rename to frontend/src/presenter/UserActive/UserActive.stories.js
diff --git a/frontend/src/atom/UserActive/index.js b/frontend/src/presenter/UserActive/index.js
similarity index 100%
rename from frontend/src/atom/UserActive/index.js
rename to frontend/src/presenter/UserActive/index.js
diff --git a/frontend/src/atom/UserProfileImg/UserProfileImg.js b/frontend/src/presenter/UserProfileImg/UserProfileImg.js
similarity index 88%
rename from frontend/src/atom/UserProfileImg/UserProfileImg.js
rename to frontend/src/presenter/UserProfileImg/UserProfileImg.js
index 7ee97d2c..1faf8880 100644
--- a/frontend/src/atom/UserProfileImg/UserProfileImg.js
+++ b/frontend/src/presenter/UserProfileImg/UserProfileImg.js
@@ -5,10 +5,10 @@ import UserActive from '../UserActive'
const UserProfileImg = ({ user, size, showActive, type = 'default' }) => {
return (
-
+
{showActive && (
-
+
)}
diff --git a/frontend/src/atom/UserProfileImg/UserProfileImg.stories.js b/frontend/src/presenter/UserProfileImg/UserProfileImg.stories.js
similarity index 100%
rename from frontend/src/atom/UserProfileImg/UserProfileImg.stories.js
rename to frontend/src/presenter/UserProfileImg/UserProfileImg.stories.js
diff --git a/frontend/src/atom/UserProfileImg/index.js b/frontend/src/presenter/UserProfileImg/index.js
similarity index 100%
rename from frontend/src/atom/UserProfileImg/index.js
rename to frontend/src/presenter/UserProfileImg/index.js
diff --git a/frontend/src/stories/Button.js b/frontend/src/stories/Button.js
deleted file mode 100644
index 75c2c31a..00000000
--- a/frontend/src/stories/Button.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-import './button.css'
-
-/**
- * Primary UI component for user interaction
- */
-export const Button = ({ primary, backgroundColor, size, label, ...props }) => {
- const mode = primary
- ? 'storybook-button--primary'
- : 'storybook-button--secondary'
- return (
-
- )
-}
-
-Button.propTypes = {
- /**
- * Is this the principal call to action on the page?
- */
- primary: PropTypes.bool,
- /**
- * What background color to use
- */
- backgroundColor: PropTypes.string,
- /**
- * How large should the button be?
- */
- size: PropTypes.oneOf(['small', 'medium', 'large']),
- /**
- * Button contents
- */
- label: PropTypes.string.isRequired,
- /**
- * Optional click handler
- */
- onClick: PropTypes.func,
-}
-
-Button.defaultProps = {
- backgroundColor: null,
- primary: false,
- size: 'medium',
- onClick: undefined,
-}
diff --git a/frontend/src/stories/Button.stories.js b/frontend/src/stories/Button.stories.js
deleted file mode 100644
index 3d78ceda..00000000
--- a/frontend/src/stories/Button.stories.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import React from 'react'
-
-import { Button } from './Button'
-
-export default {
- title: 'Example/Button',
- component: Button,
- argTypes: {
- backgroundColor: { control: 'color' },
- },
-}
-
-const Template = args =>
-
-export const Primary = Template.bind({})
-Primary.args = {
- primary: true,
- label: 'Button',
-}
-
-export const Secondary = Template.bind({})
-Secondary.args = {
- label: 'Button',
-}
-
-export const Large = Template.bind({})
-Large.args = {
- size: 'large',
- label: 'Button',
-}
-
-export const Small = Template.bind({})
-Small.args = {
- size: 'small',
- label: 'Button',
-}
diff --git a/frontend/src/stories/Header.js b/frontend/src/stories/Header.js
deleted file mode 100644
index 734844e3..00000000
--- a/frontend/src/stories/Header.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-
-import { Button } from './Button'
-import './header.css'
-
-export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (
-
-
-
-
-
Acme
-
-
- {user ? (
-
- ) : (
- <>
-
-
- >
- )}
-
-
-
-)
-
-Header.propTypes = {
- user: PropTypes.shape({}),
- onLogin: PropTypes.func.isRequired,
- onLogout: PropTypes.func.isRequired,
- onCreateAccount: PropTypes.func.isRequired,
-}
-
-Header.defaultProps = {
- user: null,
-}
diff --git a/frontend/src/stories/Header.stories.js b/frontend/src/stories/Header.stories.js
deleted file mode 100644
index a709af05..00000000
--- a/frontend/src/stories/Header.stories.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import React from 'react'
-
-import { Header } from './Header'
-
-export default {
- title: 'Example/Header',
- component: Header,
-}
-
-const Template = args =>
-
-export const LoggedIn = Template.bind({})
-LoggedIn.args = {
- user: {},
-}
-
-export const LoggedOut = Template.bind({})
-LoggedOut.args = {}
diff --git a/frontend/src/stories/Introduction.stories.mdx b/frontend/src/stories/Introduction.stories.mdx
deleted file mode 100644
index 0a5d450a..00000000
--- a/frontend/src/stories/Introduction.stories.mdx
+++ /dev/null
@@ -1,207 +0,0 @@
-import { Meta } from '@storybook/addon-docs/blocks';
-import Code from './assets/code-brackets.svg';
-import Colors from './assets/colors.svg';
-import Comments from './assets/comments.svg';
-import Direction from './assets/direction.svg';
-import Flow from './assets/flow.svg';
-import Plugin from './assets/plugin.svg';
-import Repo from './assets/repo.svg';
-import StackAlt from './assets/stackalt.svg';
-
-
-
-
-
-# Welcome to Storybook
-
-Storybook helps you build UI components in isolation from your app's business logic, data, and context.
-That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
-
-Browse example stories now by navigating to them in the sidebar.
-View their code in the `src/storybook-examples` directory to learn how they work.
-We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
-
-
- We recommend building UIs with a{' '}
-
- component-driven
- {' '}
- process starting with atomic components and ending with pages.
-
-
- Render pages with mock data. This makes it easy to build and review page
- states without needing to navigate to them in your app. Here are some
- handy patterns for managing page data in Storybook:
-
-
-
- Use a higher-level connected component. Storybook helps you compose
- such data from the "args" of child component stories
-
-
- Assemble data in the page component from your services. You can mock
- these services out using Storybook.
-
-
-
- Get a guided tutorial on component-driven development at{' '}
-
- Learn Storybook
-
- . Read more in the{' '}
-
- docs
-
- .
-
-
- Tip Adjust the width of the canvas with the{' '}
-
- Viewports addon in the toolbar
-