Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
kcwww committed Dec 6, 2023
1 parent 467fc66 commit 1d18ef0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions front/src/pages/Intro/MsgBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const MsgBox = () => {
content={message}
sender={sender}
to={userData.nickname}
isDeco={false}
/>
) : null}
</>
Expand Down
22 changes: 11 additions & 11 deletions front/src/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ const Main = () => {
const leftArrowRef = useRef<HTMLImageElement>(null);
const rightArrowRef = useRef<HTMLImageElement>(null);

const saveCookie = () => {
const cookieToken = import.meta.env.VITE_APP_COOKIE_TOKEN;
const cookieName = 'access_token';
const cookieValue = cookieToken;
const today = new Date();
const expire = new Date();
const secure = true;
expire.setDate(today.getDate() + 1);
document.cookie = `${cookieName}=${cookieValue}; expires=${expire.toUTCString()}; secure=${secure}; path=/`;
};
// const saveCookie = () => {
// const cookieToken = import.meta.env.VITE_APP_COOKIE_TOKEN;
// const cookieName = 'access_token';
// const cookieValue = cookieToken;
// const today = new Date();
// const expire = new Date();
// const secure = true;
// expire.setDate(today.getDate() + 1);
// document.cookie = `${cookieName}=${cookieValue}; expires=${expire.toUTCString()}; secure=${secure}; path=/`;
// };

useEffect(() => {
saveCookie();
//saveCookie();
axios
.get('/api/user', {
withCredentials: true // axios 쿠키 값 전달
Expand Down
1 change: 1 addition & 0 deletions front/src/pages/Make/Snowball/MainDeco/MsgBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const MsgBox = ({ isInput }: MsgBoxProps) => {
isInput={isInput}
content={''}
sender={''}
isDeco={true}
/>
</MsgContainer>
);
Expand Down

0 comments on commit 1d18ef0

Please sign in to comment.