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
7 changes: 2 additions & 5 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ export const apiClient = axios.create({
},
withCredentials: true, // 쿠키 자동 전송 설정
});

// 임시 하드코딩된 토큰 (쿠키가 없을 때 사용)
// const TEMP_ACCESS_TOKEN =
// 'eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjEsImlhdCI6MTc1NDM4MjY1MiwiZXhwIjoxNzU2OTc0NjUyfQ.BSGuoMWlrzc0oKgSJXHEycxdzzY9-e7gD4xh-wSDemc';

// Request 인터셉터: localStorage의 토큰을 헤더에 자동 추가
apiClient.interceptors.request.use(
config => {
Expand All @@ -29,6 +24,8 @@ apiClient.interceptors.request.use(
config.headers.Authorization = `Bearer ${authToken}`;
} else {
console.log('❌ localStorage에 토큰이 없습니다.');
// config.headers.Authorization =
// 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjEsImlhdCI6MTc1NDM4MjY1MiwiZXhwIjoxNzU2OTc0NjUyfQ.BSGuoMWlrzc0oKgSJXHEycxdzzY9-e7gD4xh-wSDemc';
}

return config;
Expand Down
1 change: 0 additions & 1 deletion src/components/createpost/PostContentSection.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const TextArea = styled.textarea<{ readOnly?: boolean }>`
min-height: 100px;
background-color: ${props => (props.readOnly ? '#f5f5f5' : semanticColors.background.primary)};
color: ${semanticColors.text.secondary};
font-size: ${typography.fontSize.sm};
font-weight: ${typography.fontWeight.regular};
font-family: ${typography.fontFamily.primary};
resize: none;
Expand Down
2 changes: 1 addition & 1 deletion src/components/feed/MyFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const MyFeed = ({ showHeader, posts = [], isLast = false }: FeedListProps) => {
return (
<Container>
<Profile
userId={profileData.creatorId}
userId={profileData.creatorId || profileData.userId}
showFollowButton={false}
profileImageUrl={profileData.profileImageUrl}
nickname={profileData.nickname}
Expand Down
8 changes: 4 additions & 4 deletions src/components/feed/MyFollower.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ const Container = styled.div`
`;

interface MyFollowerProps {
creatorId?: number;
followerCount: number;
latestFollowerProfileImageUrls?: string[];
userId?: number;
}

const MyFollower = ({
creatorId,
followerCount = 0,
latestFollowerProfileImageUrls = [],
userId,
}: MyFollowerProps) => {
const navigate = useNavigate();

const handleMoreClick = () => {
if (creatorId) {
navigate(`/follow/followerlist/${creatorId}`);
if (userId) {
navigate(`/follow/followerlist/${userId}`);
}
};

Expand Down
4 changes: 1 addition & 3 deletions src/components/feed/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export interface ProfileProps {
aliasColor: string;
followerCount: number;
latestFollowerProfileImageUrls?: string[];
creatorId?: number;
userId?: number;
isMyFeed?: boolean;
}
Expand All @@ -27,7 +26,6 @@ const Profile = ({
aliasColor,
followerCount,
latestFollowerProfileImageUrls = [],
creatorId,
userId,
isMyFeed,
}: ProfileProps) => {
Expand Down Expand Up @@ -94,7 +92,7 @@ const Profile = ({
<MyFollower
followerCount={followerCount}
latestFollowerProfileImageUrls={latestFollowerProfileImageUrls}
creatorId={creatorId}
userId={userId}
/>
</Container>
);
Expand Down
1 change: 0 additions & 1 deletion src/components/recordwrite/RecordContentSection.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const TextArea = styled.textarea`
max-height: 200px;
background-color: ${semanticColors.background.primary};
color: ${semanticColors.text.secondary};
font-size: ${typography.fontSize.sm};
font-weight: ${typography.fontWeight.regular};
font-family: ${typography.fontFamily.primary};
line-height: 1.5;
Expand Down
1 change: 0 additions & 1 deletion src/components/search/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ const Input = styled.input`
border: none;
background: transparent;
color: #ffffff;
font-size: 14px;
padding: 8px 0;
box-sizing: border-box;
caret-color: var(--color-neongreen);
Expand Down
1 change: 0 additions & 1 deletion src/components/today-words/MessageInput.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export const MessageInput = styled.textarea`
border: none;
padding: 10px 58px 10px 12px;
color: ${semanticColors.text.primary};
font-size: ${typography.fontSize.sm};
font-weight: ${typography.fontWeight.regular};
font-family: ${typography.fontFamily.primary};
line-height: 1.4;
Expand Down
7 changes: 6 additions & 1 deletion src/pages/feed/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,13 @@ const Feed = () => {

// localStorage에 토큰이 있는지 확인
const authToken = localStorage.getItem('authToken');
// 토큰이 없으면 하드코딩된 토큰으로 설정
if (!authToken) {
console.log('❌ 토큰이 없어서 피드를 로드할 수 없습니다.');
// localStorage.setItem(
// 'authToken',
// 'eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjEsImlhdCI6MTc1NDM4MjY1MiwiZXhwIjoxNzU2OTc0NjUyfQ.BSGuoMWlrzc0oKgSJXHEycxdzzY9-e7gD4xh-wSDemc',
// );
console.log('🔑 하드코딩된 토큰으로 설정했습니다.');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/groupSearch/GroupSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const GroupSearch = () => {
/>

<SearchBar
placeholder="방제목 혹은 책제목을 검색해보세요."
placeholder="방 제목 혹은 책 제목을 검색해보세요."
value={searchTerm}
onChange={handleChange}
onSearch={handleSearch}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ const Search = () => {
)}
<SearchBarContainer>
<SearchBar
placeholder="책 제목, 작가명을 검색해보세요."
placeholder="책 제목 혹은 작가명을 검색해보세요."
value={searchTerm}
onChange={handleChange}
onSearch={() => handleSearch(searchTerm.trim(), true)}
Expand Down
4 changes: 3 additions & 1 deletion src/styles/global/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ export const globalStyles = css`
}

/* Input 요소 전역 스타일 */
input {
input,
textarea {
caret-color: ${colors.neongreen};
font-size: ${typography.fontSize.base};
}

${coreDesignTokens}
Expand Down
4 changes: 2 additions & 2 deletions src/types/profile.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// 내 프로필 정보 타입
export interface MyProfileData {
creatorId: number;
userId: number;
creatorId?: number;
profileImageUrl: string;
userId?: number;
nickname: string;
aliasName: string;
aliasColor: string;
Expand Down