Skip to content

Commit

Permalink
Fe/dev2 (#98)
Browse files Browse the repository at this point in the history
* WIP: 깃허브 로그인 중

* WIP: 깃허브 로그인

* feat: 로컬 스토리지 토큰 읽어오기

* feat: authorization 추가

* fix: authorization 변수에 할당하여 지정

* feat: credentials 헤더  속성 추가

* refactor: strict 모드 주석 해제

* style: 주석 제거 및 margin추가

* feat: header 에 origin 추가
  • Loading branch information
minjeongHEO authored May 31, 2024
1 parent e6bcf9b commit 2b8d276
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions FE/src/api/fetchFilterData.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export const fetchIssueListData = async (isClosedParam, authorIdParam, assigneeI
headers: {
Authorization: `Bearer ${accessToken}`,
credentials: 'include',
Origin: 'https://issue-tracker.site',
},
}
);
Expand Down
8 changes: 1 addition & 7 deletions FE/src/components/issues/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export default function Main() {
const { data: milestonesFilter, isLoading: milestonesFilterIsLoading } = useMilestonesFilter({ enabled: hasFetched.milestone });
const { data: membersFilter, isLoading: membersFilterIsLoading } = useMembersFilter({ enabled: hasFetched.assignee });


const clearFilter = () => dispatch({ type: 'SET_CLEAR_FILTER', payload: '' });

const isFilterActive = () => {
Expand Down Expand Up @@ -203,12 +202,6 @@ export default function Main() {
setMilestoneCount(countData.milestoneCount.isOpened + countData.milestoneCount.isClosed);
}, [countData]);

// useEffect(() => {
// const url = new URL(window.location.href);
// const authorizationCode = url.searchParams.get('code');
// console.log(authorizationCode); //인증 코드
// }, []);

return (
<MainContainer>
<StyledNav>
Expand Down Expand Up @@ -309,6 +302,7 @@ const StyledNewIssueBtn = styled(CustomButton)`
font-size: 15px;
font-weight: 500;
color: #fff;
margin-left: 10px;
`;

const StyledMilestoneBtn = styled(CustomButton)`
Expand Down
10 changes: 5 additions & 5 deletions FE/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import './styles/index.css';
import DarkModeProvider from './context/DarkModeContext.jsx';

ReactDOM.createRoot(document.getElementById('root')).render(
// <React.StrictMode>
<DarkModeProvider>
<App />
</DarkModeProvider>
// </React.StrictMode>
<React.StrictMode>
<DarkModeProvider>
<App />
</DarkModeProvider>
</React.StrictMode>
);

0 comments on commit 2b8d276

Please sign in to comment.