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
2 changes: 2 additions & 0 deletions src/frontend/src/components/common/AuthDateInput/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import styled from 'styled-components';

import { SmallText } from '@/styles/Typography';

import { DescriptionType } from '../AuthInput';

export const DateInputContainer = styled.div`
display: flex;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TbPlus } from 'react-icons/tb';
import { GuildChannelInfo, useChannelInfoStore } from '@/stores/channelInfo';
import { useGuildInfoStore } from '@/stores/guildInfo';
import useModalStore from '@/stores/modalStore';
import { BodyMediumText, BodyRegularText, ChipText } from '@/styles/Typography';
import { BodyRegularText, ChipText } from '@/styles/Typography';
import { CategoryDataResult, ChannelResult, ChannelType } from '@/types/guilds';

import CreateChannelModal from '../CreateChannelModal';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState } from 'react';
import { useEffect, useState } from 'react';
import { FiEdit2, FiTrash2 } from 'react-icons/fi';

import ChatTextarea from '../ChatTextarea';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MdEmojiEmotions } from 'react-icons/md';
import ChatTextarea from '../ChatTextarea';
import MessageItem from '../MessageItem';

import useChat, { ChatMessage } from './hooks/useChat';
import useChat from './hooks/useChat';
import useChatTextarea from './hooks/useChatTextarea';
import * as S from './styles';

Expand All @@ -16,38 +16,7 @@ interface MessageSectionProps {

const MessageSection = ({ channelId }: MessageSectionProps) => {
const { messages, sendMessage } = useChat({ channelId });
const MOCKDATA: ChatMessage[] = [
{
profileImage: '',
channelId,
name: '철민',
content: '테스트용 메시지',
},
{
profileImage: '',
channelId,
name: '철민',
content: '테스트용 메시지테스트용 메시지테스트용 메시지테스트용 메시지',
},
{
profileImage: '',
channelId,
name: '철민',
content: '테스트용 메시지테스트용 메시지',
},
{
profileImage: '',
channelId,
name: '철민',
content: '테스트용 메시지테스트용 메시지테스트용 메시지테스트용 메시지테스트용 메시지테스트용 메시지',
},
{
profileImage: '',
channelId,
name: '철민',
content: '테스트용 메시지테스트용 메시지테스트용 메시지테스트용 메시지테스트용 메시지',
},
];

// TODO: 이전 채팅 기록 불러오는 로직 추가 예정
const { chatInput, textareaRef, handleTextareaChange, handleKeyDown } = useChatTextarea({
sendMessage,
Expand Down Expand Up @@ -81,7 +50,7 @@ const MessageSection = ({ channelId }: MessageSectionProps) => {
<S.MessageSection>
<S.MessageContainer>
<S.MessageItemList>
{MOCKDATA.map((message, index) => (
{messages.map((message, index) => (
<MessageItem
key={`${index}_${message.content}`}
sentUserProfileUrl={message.profileImage}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/pages/LoginPage/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { motion } from 'motion/react';
import styled, { keyframes } from 'styled-components';
import styled from 'styled-components';

import {
BodyMediumText,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react';
import { replace, useNavigate } from 'react-router-dom';
import { useNavigate } from 'react-router-dom';

import { postAuthCode } from '@/api/users';
import Modal from '@/components/common/Modal';
Expand Down