diff --git a/backend/src/main/java/com/votogether/global/config/WebMvcConfig.java b/backend/src/main/java/com/votogether/global/config/WebMvcConfig.java index 059ce3154..c03bdc5ca 100644 --- a/backend/src/main/java/com/votogether/global/config/WebMvcConfig.java +++ b/backend/src/main/java/com/votogether/global/config/WebMvcConfig.java @@ -25,10 +25,6 @@ public class WebMvcConfig implements WebMvcConfigurer { private static final String LOCALHOST_FRONTEND = "http://localhost:3000"; private static final String HTTPS_LOCALHOST_FRONTEND = "https://localhost:3000"; - private static final String HTTPS_JERO = "https://jero-votogether-next.vercel.app/"; - private static final String HTTPS_WUS = "https://wus-votogether-next-app.vercel.app/"; - private static final String HTTPS_CHSUA = "https://chsua-votogether-next-app.vercel.app/"; - private static final String DEV_SERVER = "https://dev.votogether.com"; private static final String PROD_SERVER = "https://votogether.com"; @@ -45,9 +41,6 @@ public FilterRegistrationBean corsFilterRegistrationBean() { config.addAllowedOrigin(HTTPS_LOCALHOST_FRONTEND); config.addAllowedOrigin(DEV_SERVER); config.addAllowedOrigin(PROD_SERVER); - config.addAllowedOrigin(HTTPS_JERO); - config.addAllowedOrigin(HTTPS_WUS); - config.addAllowedOrigin(HTTPS_CHSUA); config.addAllowedHeader("*"); config.addAllowedMethod("*"); config.addExposedHeader(HttpHeaders.LOCATION); diff --git a/frontend/__test__/convertTextToUrl.test.ts b/frontend/__test__/convertTextToUrl.test.ts index d74c52a65..53fe40cde 100644 --- a/frontend/__test__/convertTextToUrl.test.ts +++ b/frontend/__test__/convertTextToUrl.test.ts @@ -6,7 +6,8 @@ test.each([ '반갑다 https://github.com/woowacourse-teams/2023-votogether/issues/703 임', '반갑다 [[https://github.com/woowacourse-teams/2023-votogether/issues/703]] 임', ], - ['안녕 wwwww.naver.com', '안녕 wwwww.naver.com'], + ['안녕 wwwww.naver.com', '안녕 ww[[www.naver.com]]'], + ['하하 [www.naver.com]', '하하 [[[www.naver.com]]]'], ['http://localhost:3000/ 피카츄', '[[http://localhost:3000/]] 피카츄'], [ 'http://localhost:3000/http://localhost:3000/ 피카츄', diff --git a/frontend/src/assets/dangseon-yo.png b/frontend/src/assets/dangseon-yo.png deleted file mode 100644 index ebe9df59d..000000000 Binary files a/frontend/src/assets/dangseon-yo.png and /dev/null differ diff --git a/frontend/src/assets/dangseon.png b/frontend/src/assets/dangseon.png deleted file mode 100644 index 448c206a0..000000000 Binary files a/frontend/src/assets/dangseon.png and /dev/null differ diff --git a/frontend/src/components/AlarmContainer/style.ts b/frontend/src/components/AlarmContainer/style.ts index 8a115a60f..606a32e17 100644 --- a/frontend/src/components/AlarmContainer/style.ts +++ b/frontend/src/components/AlarmContainer/style.ts @@ -5,7 +5,6 @@ export const Container = styled.div` grid-template-rows: 40px auto; gap: 10px; - height: 100%; padding: 10px; `; diff --git a/frontend/src/components/common/LogoButton/index.tsx b/frontend/src/components/common/LogoButton/index.tsx index 3fb63393c..eee09b238 100644 --- a/frontend/src/components/common/LogoButton/index.tsx +++ b/frontend/src/components/common/LogoButton/index.tsx @@ -1,6 +1,4 @@ -import { ButtonHTMLAttributes, useState } from 'react'; - -import EventMascot from '@pages/EventMascot'; +import { ButtonHTMLAttributes } from 'react'; import logo from '@assets/logo.svg'; import votogether from '@assets/projectName.svg'; @@ -31,20 +29,11 @@ interface LogoButtonProps extends ButtonHTMLAttributes { export default function LogoButton({ content, ...rest }: LogoButtonProps) { const src = contentCategory[content].url; const ariaLabelText = contentCategory[content].name; - const [count, setCount] = useState(0); - - //이벤트를 위한 코드 - const handleLogoClick = () => { - if (count > 5) return; - - setCount(count + 1); - }; if (content === 'full') { return ( - 로고 아이콘 - {count > 5 && } + 로고 아이콘 보투게더 아이콘 ); @@ -52,8 +41,7 @@ export default function LogoButton({ content, ...rest }: LogoButtonProps) { return ( - 보투게더 아이콘 - {count > 5 && } + 보투게더 아이콘 ); } diff --git a/frontend/src/components/common/ToolTip/style.ts b/frontend/src/components/common/ToolTip/style.ts index 80466198e..df1e3e790 100644 --- a/frontend/src/components/common/ToolTip/style.ts +++ b/frontend/src/components/common/ToolTip/style.ts @@ -6,7 +6,7 @@ const SIZE = { sm: { height: '300px', width: '250px' }, md: { height: '460px', width: '315px' }, lg: { height: '740px', width: '420px' }, - free: { height: '100%', width: '100%' }, + free: { height: 'fit-content', width: '100%' }, }; export const Container = styled.div` diff --git a/frontend/src/components/common/UpButton/index.tsx b/frontend/src/components/common/UpButton/index.tsx index e4d057f7e..29d7d6db7 100644 --- a/frontend/src/components/common/UpButton/index.tsx +++ b/frontend/src/components/common/UpButton/index.tsx @@ -1,31 +1,15 @@ -import React, { useState } from 'react'; +import React from 'react'; import chevronUp from '@assets/chevron_up_primary.svg'; -import mascotYo from '@assets/dangseon-yo.png'; import * as S from './style'; interface UpButtonProps extends React.ButtonHTMLAttributes {} export default function UpButton({ ...rest }: UpButtonProps) { - const [count, setCount] = useState(0); - - //이벤트를 위한 코드 - const handleLogoClick = () => { - if (count > 5) return; - - setCount(count + 1); - }; - const handleClick = () => { - setCount(0); - }; - return ( - <> - - 페이지 최상단으로 스크롤 올리기 - - 5} /> - + + 페이지 최상단으로 스크롤 올리기 + ); } diff --git a/frontend/src/components/common/UpButton/style.ts b/frontend/src/components/common/UpButton/style.ts index a68e8598c..9ecf51165 100644 --- a/frontend/src/components/common/UpButton/style.ts +++ b/frontend/src/components/common/UpButton/style.ts @@ -10,31 +10,3 @@ export const Button = styled.button` cursor: pointer; `; - -//이벤트를 위한 코드 -export const Image = styled.img<{ $isMoving: boolean }>` - width: 50px; - height: 50px; - - position: absolute; - right: 13px; - bottom: 83px; - z-index: -1; - - ${props => - props.$isMoving - ? `animation: move 1s linear infinite; - - @keyframes move { - 0% { - right: 13px; - } - 50% { - right: 200px; - } - 100% { - right: 13px; - } - }` - : ''}; -`; diff --git a/frontend/src/components/post/Post/style.ts b/frontend/src/components/post/Post/style.ts index 840111b5c..30ed78307 100644 --- a/frontend/src/components/post/Post/style.ts +++ b/frontend/src/components/post/Post/style.ts @@ -99,6 +99,7 @@ export const Content = styled.div<{ $isPreview: boolean }>` export const DetailLink = styled.button<{ $isPreview: boolean }>` display: flex; flex-direction: column; + text-align: left; gap: 10px; width: 100%; diff --git a/frontend/src/pages/EventMascot/index.tsx b/frontend/src/pages/EventMascot/index.tsx deleted file mode 100644 index 4b09f988b..000000000 --- a/frontend/src/pages/EventMascot/index.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { useState } from 'react'; - -import mascotYo from '@assets/dangseon-yo.png'; -import mascot from '@assets/dangseon.png'; - -import * as S from './style'; - -//이벤트를 위한 코드 -export default function EventMascot({ type }: { type: 'ma' | 'mayo' }) { - const [isVisible, setIsVisible] = useState(true); - - const handleClick = () => { - setIsVisible(false); - }; - - return ( - - - - ); -} diff --git a/frontend/src/pages/EventMascot/style.ts b/frontend/src/pages/EventMascot/style.ts deleted file mode 100644 index cf306f08e..000000000 --- a/frontend/src/pages/EventMascot/style.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { styled } from 'styled-components'; - -import { theme } from '@styles/theme'; - -//이벤트를 위한 코드 -export const Container = styled.div<{ $isVisible: boolean }>` - display: ${props => (props.$isVisible ? '' : 'none')}; - - position: absolute; - top: 40vh; - left: 40vw; - - @media (min-width: ${theme.breakpoint.sm}) { - top: 45vh; - left: 45vw; - } -`; - -export const Image = styled.img` - width: 100px; - height: 100px; -`; diff --git a/frontend/src/styles/reset.ts b/frontend/src/styles/reset.ts index 578625676..2d53a33da 100644 --- a/frontend/src/styles/reset.ts +++ b/frontend/src/styles/reset.ts @@ -42,6 +42,7 @@ button, input, select { margin: 0; + color: black; } html { box-sizing: border-box; @@ -80,7 +81,7 @@ button{ } a{ - color: inherit; + color: black; text-decoration: none; } `; diff --git a/frontend/src/utils/post/convertTextToUrl.ts b/frontend/src/utils/post/convertTextToUrl.ts index 848658126..70fb4b235 100644 --- a/frontend/src/utils/post/convertTextToUrl.ts +++ b/frontend/src/utils/post/convertTextToUrl.ts @@ -1,29 +1,18 @@ -/** - * https://abc.co.kr/@abc/4 - * https://votogether.com/ - * http://localhost:3000/posts/100035 - * http://votogether.com/ - * (? { - const httpOrHttpsConvertedText = text.replace(httpsOrHttpRegex, url => `[[${url}]]`); - const wwwConvertedText = httpOrHttpsConvertedText.replace(wwwRegex, url => `[[${url}]]`); + //아아[[링크]]다다 = [아아, 링크, 다다]; + const parts = text.split(customLinkPattern); + + return parts + .map(part => { + //linkRegex를 포함하지 않는다면 그대로 return + if (!linkRegex.test(part)) return part; - return wwwConvertedText; + return part.replace(linkRegex, url => `[[${url}]]`); + }) + .join(''); };