diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7a95faa8..c9a921ec 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,7 +9,7 @@ on:
jobs:
lint-and-format:
runs-on: ubuntu-latest
-
+
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -23,9 +23,6 @@ jobs:
- name: Install dependencies
run: npm ci
- - name: Run ESLint
- run: npm run lint
-
- name: Check Prettier formatting
run: npx prettier --check "src/**/*.{ts,tsx,js,jsx,json,css}"
diff --git a/src/components/CardList/StockCard/StockCard.tsx b/src/components/CardList/StockCard/StockCard.tsx
index a203c36d..bc150433 100644
--- a/src/components/CardList/StockCard/StockCard.tsx
+++ b/src/components/CardList/StockCard/StockCard.tsx
@@ -87,7 +87,9 @@ export const SmallStockCard = ({
- {keywords?.map((e) => #{e}
)}
+ {keywords?.map((e) => (
+ #{e}
+ ))}
diff --git a/src/components/Common/ContentsItem.Style.ts b/src/components/Common/ContentsItem.Style.ts
index ea3add1f..5b1fbecf 100644
--- a/src/components/Common/ContentsItem.Style.ts
+++ b/src/components/Common/ContentsItem.Style.ts
@@ -12,36 +12,35 @@ const ContentsItemContainer = styled.div({
},
});
-const ContentsItemTitle = styled.div<{ color?: themeColor }>(
- ({ color }) =>
- css({
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'flex-start',
- gap: '8px',
- color: theme.colors.grayscale10,
- ...theme.font.title20Semibold,
+const ContentsItemTitle = styled.div<{ color?: themeColor }>(({ color }) =>
+ css({
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'flex-start',
+ gap: '8px',
+ color: theme.colors.grayscale10,
+ ...theme.font.title20Semibold,
- ['.btn_info']: {
- height: '0.8em',
- marginLeft: '4px',
- cursor: 'pointer',
- },
+ ['.btn_info']: {
+ height: '0.8em',
+ marginLeft: '4px',
+ cursor: 'pointer',
+ },
- ['svg']: {
- width: 'auto',
- height: '0.9em',
- fill: color ? theme.colors[color] : '',
- },
+ ['svg']: {
+ width: 'auto',
+ height: '0.9em',
+ fill: color ? theme.colors[color] : '',
+ },
- [media[0]]: {
- gap: '6px',
+ [media[0]]: {
+ gap: '6px',
- ['.btn_info']: {
- marginLeft: '0px',
- },
+ ['.btn_info']: {
+ marginLeft: '0px',
},
- })
+ },
+ }),
);
const ContentsItemContent = styled.div({
@@ -55,7 +54,6 @@ const ContentsItemContent = styled.div({
},
});
-
export const DetailText = styled.div({
...theme.font.detail12Medium,
color: theme.colors.sub_gray6,
diff --git a/src/components/Home/StockTable/StockTable.tsx b/src/components/Home/StockTable/StockTable.tsx
index 8272ef55..5d82f63f 100644
--- a/src/components/Home/StockTable/StockTable.tsx
+++ b/src/components/Home/StockTable/StockTable.tsx
@@ -6,8 +6,8 @@ import { diffToPercent, diffToValue } from '@utils/ScoreConvert';
import { useQueryComponent } from '@hooks/useQueryComponent';
import { webPath } from '@router/index';
import StockImage from '@components/Common/StockImage';
-import { StockTableInfo } from '@controllers/stocks/types';
import { useStockTableInfoQuery } from '@controllers/stocks/query';
+import { StockTableInfo } from '@controllers/stocks/types';
import { HomeItemTitle } from '../Title/Title.Style';
import {
StockTableContainer,
@@ -80,7 +80,10 @@ const StockTable = ({ country }: { country: StockCountryKey }) => {
- {currency}{stock.price.toLocaleString()}
+
+ {currency}
+ {stock.price.toLocaleString()}
+
{diffToValue(stock.priceDiff)}(
{diffToPercent(stock.price, stock.priceDiff, { fixed: 2, sign: false })})
diff --git a/src/components/Lab/Common.Style.ts b/src/components/Lab/Common.Style.ts
index 1e9774cd..de6d2ab7 100644
--- a/src/components/Lab/Common.Style.ts
+++ b/src/components/Lab/Common.Style.ts
@@ -1,4 +1,3 @@
-
import styled from '@emotion/styled';
import { theme } from '@styles/themes';
@@ -21,17 +20,16 @@ export const TopBar = styled.div<{ statusRate: number }>`
border-bottom: 4px solid ${theme.colors.sub_gray11};
&::before {
- content: '';
position: absolute;
bottom: -4px;
left: 0;
- height: 4px;
- width: ${({ statusRate }) => `${statusRate}%`};
background: ${theme.colors.sub_gray9};
- }
+ width: ${({ statusRate }) => `${statusRate}%`};
+ height: 4px;
+ content: '';
+ }
`;
-
export const BackIcon = styled.div`
position: absolute;
left: 20px;
@@ -54,7 +52,7 @@ export const TabContainer = styled.div`
export const InnerContainer = styled.div`
padding: 24px;
- padding-bottom: 120px;
+ padding-bottom: 120px;
overflow-y: auto;
justify-content: space-between;
`;
@@ -76,35 +74,35 @@ export const NavButtonContainer = styled.div`
margin-top: 100px;
`;
-export const NavButton = styled.button<{ next?: boolean, active?: boolean }>`
+export const NavButton = styled.button<{ next?: boolean; active?: boolean }>`
${theme.font.body18Semibold};
flex: 1;
padding: 12px;
margin: 0 4px;
border-radius: 8px;
border: none;
- background: ${({ next, active }) => active ? theme.colors.sub_blue6 : next ? theme.colors.sub_gray8 : theme.colors.sub_gray11};
- color: ${({ next, active }) => active ? theme.colors.sub_white : next ? theme.colors.sub_black : theme.colors.sub_gray5};
-
+ background: ${({ next, active }) =>
+ active ? theme.colors.sub_blue6 : next ? theme.colors.sub_gray8 : theme.colors.sub_gray11};
+ color: ${({ next, active }) =>
+ active ? theme.colors.sub_white : next ? theme.colors.sub_black : theme.colors.sub_gray5};
`;
export const IndustryTag = styled.div<{ selected: boolean }>`
padding: 8px 16px;
- background: ${({ selected }) => selected ? theme.colors.sub_blue6 : theme.colors.sub_gray10};
- color: ${({ selected }) => selected ? theme.colors.sub_white : theme.colors.sub_gray6};
+ background: ${({ selected }) => (selected ? theme.colors.sub_blue6 : theme.colors.sub_gray10)};
+ color: ${({ selected }) => (selected ? theme.colors.sub_white : theme.colors.sub_gray6)};
border-radius: 50px;
`;
-
export const SearchInput = styled.input`
background: transparent;
border: none;
outline: none;
flex: 1;
color: white;
-
- &::placeholder{
- ${theme.font.body16Medium}
+
+ &::placeholder {
+ ${theme.font.body16Medium}
color: ${theme.colors.sub_gray7};
}
`;
@@ -118,14 +116,13 @@ export const SearchIconWrapper = styled.div`
export const SearchBar = styled.div`
background: ${theme.colors.sub_gray11};
- color:white;
+ color: white;
border-radius: 8px;
display: flex;
align-items: center;
padding: 10px 12px;
`;
-
export const ToastStyle = styled.div`
${theme.font.detail12Semibold}
color:${theme.colors.sub_gray2};
@@ -134,7 +131,7 @@ export const ToastStyle = styled.div`
left: 50%;
transform: translateX(-50%);
padding: 12px 16px;
- background: rgba(0, 0, 0, 0.80);
+ background: rgba(0, 0, 0, 0.8);
border: 1px solid rgba(73, 80, 87, 0.5);
border-radius: 5px;
z-index: 1000;
@@ -149,7 +146,6 @@ export const ToastStyle = styled.div`
justify-content: center;
`;
-
export const Divider = styled.div`
background-color: ${theme.colors.sub_gray11};
width: calc(100% + 48px);
diff --git a/src/components/Lab/ExperimentItem/ExperimentItem.tsx b/src/components/Lab/ExperimentItem/ExperimentItem.tsx
index c9d14a3b..c6fe0446 100644
--- a/src/components/Lab/ExperimentItem/ExperimentItem.tsx
+++ b/src/components/Lab/ExperimentItem/ExperimentItem.tsx
@@ -1,7 +1,7 @@
+import { getFormattedDate } from '@utils/dateFormatter';
import StockImage from '@components/Common/StockImage';
import { ExperimentItem } from '@controllers/experiment/api';
import { ColoredDiffLabel, ExperimentItemContainer, ExperimentItemContent } from './ExperimentItem.Style';
-import { getFormattedDate } from '@utils/dateFormatter';
const ExperimentItemComponent = ({
experiment,
diff --git a/src/components/Modal/Common.Style.ts b/src/components/Modal/Common.Style.ts
index 3257bed9..27e086e3 100644
--- a/src/components/Modal/Common.Style.ts
+++ b/src/components/Modal/Common.Style.ts
@@ -1,5 +1,5 @@
-import styled from "@emotion/styled";
-import { theme } from "@styles/themes";
+import styled from '@emotion/styled';
+import { theme } from '@styles/themes';
export const Modal = styled.div`
position: fixed;
@@ -56,9 +56,9 @@ export const ModalButtons = styled.div`
export const ModalButton = styled.button`
flex: 1;
background: ${theme.colors.sub_gray2};
- color: ${theme.colors.sub_gray8};
+ color: ${theme.colors.sub_gray8};
border: none;
- padding: 12px 0;
+ padding: 12px 0;
border-radius: 500px;
font-size: 18px;
font-weight: 700;
@@ -68,4 +68,4 @@ export const ModalButton = styled.button`
export const ModalButtonPrimary = styled(ModalButton)`
background: ${theme.colors.sub_black};
color: ${theme.colors.sub_white};
-`;
+`;
diff --git a/src/components/Modal/ExperimentDetail/ExperimentDetail.tsx b/src/components/Modal/ExperimentDetail/ExperimentDetail.tsx
index c8246703..dde0ea30 100644
--- a/src/components/Modal/ExperimentDetail/ExperimentDetail.tsx
+++ b/src/components/Modal/ExperimentDetail/ExperimentDetail.tsx
@@ -1,12 +1,12 @@
import { useEffect, useMemo, useRef, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { STOCK_COUNTRY_MAP } from '@ts/StockCountry';
+import { getFormattedDate } from '@utils/dateFormatter';
import { webPath } from '@router/index';
import StockImage from '@components/Common/StockImage';
import { ExperimentDetailTradeInfo } from '@controllers/experiment/api';
import { useExperimentDetailQuery } from '@controllers/experiment/query';
import { theme } from '@styles/themes';
-import { getFormattedDate } from '@utils/dateFormatter';
import {
ColoredDiffLabel,
ExperimentDetailChartContainer,
@@ -266,19 +266,19 @@ const ExperimentDetailChart = ({
return selectedTradeInfo
? [
- {
- name: '인간지표',
- value: `${currentScore}점`,
- diff: `(${scoreDiffSign}${scoreDiff}점)`,
- delta: scoreDiff,
- },
- {
- name: '수익률',
- value: `${roiDiffSign}${roi.toFixed(1)}%`,
- diff: `(${roiDiffSign}${roiDiff.toFixed(1)}%)`,
- delta: roiDiff,
- },
- ]
+ {
+ name: '인간지표',
+ value: `${currentScore}점`,
+ diff: `(${scoreDiffSign}${scoreDiff}점)`,
+ delta: scoreDiff,
+ },
+ {
+ name: '수익률',
+ value: `${roiDiffSign}${roi.toFixed(1)}%`,
+ diff: `(${roiDiffSign}${roiDiff.toFixed(1)}%)`,
+ delta: roiDiff,
+ },
+ ]
: null;
}, [selectedTradeInfo, buyScore, buyPrice]);
return (
diff --git a/src/components/MyPage/MyPage.Style.ts b/src/components/MyPage/MyPage.Style.ts
index 139597f9..e69de29b 100644
--- a/src/components/MyPage/MyPage.Style.ts
+++ b/src/components/MyPage/MyPage.Style.ts
@@ -1,2 +0,0 @@
-
-
diff --git a/src/components/NoLoginWrapper/NoLoginWrapper.tsx b/src/components/NoLoginWrapper/NoLoginWrapper.tsx
index 631035f0..301c0b03 100644
--- a/src/components/NoLoginWrapper/NoLoginWrapper.tsx
+++ b/src/components/NoLoginWrapper/NoLoginWrapper.tsx
@@ -19,7 +19,17 @@ const NoLoginWrapper = (props: NoLoginWrapperProps) => {
const { isLogin, handleNavigateLogin } = useAuthInfo();
const navigate = useNavigate();
- const { title, description, buttonText, children, className, SecondaryButtonText, hasHeader, hasNavbar, returnState } = props;
+ const {
+ title,
+ description,
+ buttonText,
+ children,
+ className,
+ SecondaryButtonText,
+ hasHeader,
+ hasNavbar,
+ returnState,
+ } = props;
const handleClick = () => {
handleNavigateLogin({ returnState });
diff --git a/src/components/PopUp/DescentPopUp/DescentPopUp.tsx b/src/components/PopUp/DescentPopUp/DescentPopUp.tsx
index c8a1cebb..cd527803 100644
--- a/src/components/PopUp/DescentPopUp/DescentPopUp.tsx
+++ b/src/components/PopUp/DescentPopUp/DescentPopUp.tsx
@@ -5,10 +5,7 @@ const ZipyoPopUp = ({ onClose }: { onClose: () => void }) => (
💧 현재 민심 급하락 중
-
- 현재 각종 주식 커뮤니티에서
- 투자자들의 민심이 부정적으로 급하락 중인 종목입니다.
-
+ 현재 각종 주식 커뮤니티에서 투자자들의 민심이 부정적으로 급하락 중인 종목입니다.
);
diff --git a/src/components/PopUp/HotPopUp/HotPopUp.tsx b/src/components/PopUp/HotPopUp/HotPopUp.tsx
index 206cce41..043ce592 100644
--- a/src/components/PopUp/HotPopUp/HotPopUp.tsx
+++ b/src/components/PopUp/HotPopUp/HotPopUp.tsx
@@ -5,9 +5,7 @@ const HotPopUp = ({ onClose }: { onClose: () => void }) => (
👑 현재 시장 반응 TOP 3
-
- 한국투자증권’ 순위를 기반으로 집계됩니다.
-
+ 한국투자증권’ 순위를 기반으로 집계됩니다.
);
diff --git a/src/components/PopUp/RisingPopUp/RisingPopUp.tsx b/src/components/PopUp/RisingPopUp/RisingPopUp.tsx
index 7f85a54e..7666e3cf 100644
--- a/src/components/PopUp/RisingPopUp/RisingPopUp.tsx
+++ b/src/components/PopUp/RisingPopUp/RisingPopUp.tsx
@@ -5,10 +5,7 @@ const RisingPopUp = ({ onClose }: { onClose: () => void }) => (
🔥 현재 민심 급상승 중
-
- 현재 각종 주식 커뮤니티에서
- 투자자들의 민심이 긍정적으로 급상승 중인 종목입니다.
-
+ 현재 각종 주식 커뮤니티에서 투자자들의 민심이 긍정적으로 급상승 중인 종목입니다.
);
diff --git a/src/components/Search/SearchTitle/SearchTitle.tsx b/src/components/Search/SearchTitle/SearchTitle.tsx
index 1d3c01e1..a273027e 100644
--- a/src/components/Search/SearchTitle/SearchTitle.tsx
+++ b/src/components/Search/SearchTitle/SearchTitle.tsx
@@ -133,7 +133,6 @@ const SearchTitle = ({ stockInfo }: { stockInfo: StockDetailInfo }) => {
navigate(webPath.labStep(), { state: { step: 4 } });
};
-
return (
stockInfo && (
diff --git a/src/components/Search/StockChart/StockChart.tsx b/src/components/Search/StockChart/StockChart.tsx
index 3d0a2c7c..c9610ea0 100644
--- a/src/components/Search/StockChart/StockChart.tsx
+++ b/src/components/Search/StockChart/StockChart.tsx
@@ -48,7 +48,7 @@ const useResizeObserver = (): [any, React.RefObject] =
if (!element) return;
const resizeObserver = new ResizeObserver((entries) => {
- for (let entry of entries) {
+ for (const entry of entries) {
const { width, height } = entry.contentRect;
setSize({
width,
diff --git a/src/components/Text/Text.ts b/src/components/Text/Text.ts
index da701a01..49d77c95 100644
--- a/src/components/Text/Text.ts
+++ b/src/components/Text/Text.ts
@@ -1,6 +1,6 @@
import styled from '@emotion/styled';
-import { TextBodyProps, TextDetailProps, TextDisplayProps, TextHeadingProps, TextTitleProps } from './Text.Props';
import { media, theme } from '../../styles/themes';
+import { TextBodyProps, TextDetailProps, TextDisplayProps, TextHeadingProps, TextTitleProps } from './Text.Props';
/**
* TextHeading
diff --git a/src/config/oauth.ts b/src/config/oauth.ts
index 451031e5..b9aa8522 100644
--- a/src/config/oauth.ts
+++ b/src/config/oauth.ts
@@ -7,7 +7,7 @@ export const SOCIAL_PROVIDER = {
APPLE: 'apple',
} as const;
-export type SocialProvider = typeof SOCIAL_PROVIDER[keyof typeof SOCIAL_PROVIDER];
+export type SocialProvider = (typeof SOCIAL_PROVIDER)[keyof typeof SOCIAL_PROVIDER];
export interface AuthConfig {
endpoint: string;
diff --git a/src/config/webview.ts b/src/config/webview.ts
index f2b4e2df..389f7099 100644
--- a/src/config/webview.ts
+++ b/src/config/webview.ts
@@ -7,4 +7,4 @@ export const MESSAGE_TYPES = {
NEED_REGISTER: 'NEED_REGISTER',
} as const;
-export type MessageType = typeof MESSAGE_TYPES[keyof typeof MESSAGE_TYPES];
+export type MessageType = (typeof MESSAGE_TYPES)[keyof typeof MESSAGE_TYPES];
diff --git a/src/constants/patternTypes.ts b/src/constants/patternTypes.ts
index 27cd6a02..e44b711f 100644
--- a/src/constants/patternTypes.ts
+++ b/src/constants/patternTypes.ts
@@ -1,29 +1,29 @@
-import { theme } from "@styles/themes";
+import { theme } from '@styles/themes';
-export type HumanType = typeof HUMAN_TYPE_LIST[number];
+export type HumanType = (typeof HUMAN_TYPE_LIST)[number];
export const HUMAN_TYPE_LIST = [
{
- type: "가치 선점형",
- emoji: "💎",
- description: "인간지표 낮을 때 매수 → 수익",
+ type: '가치 선점형',
+ emoji: '💎',
+ description: '인간지표 낮을 때 매수 → 수익',
background: theme.colors.sub_blue5,
},
{
- type: "트렌드 선점형",
- emoji: "✅",
- description: "인간지표 높을 때 매수 → 수익",
+ type: '트렌드 선점형',
+ emoji: '✅',
+ description: '인간지표 높을 때 매수 → 수익',
background: theme.colors.sub_blue6,
},
{
- type: "역행 투자형",
- emoji: "📉",
- description: "점수 낮을 때 매수 → 손실",
+ type: '역행 투자형',
+ emoji: '📉',
+ description: '점수 낮을 때 매수 → 손실',
background: theme.colors.sub_blue8,
},
{
- type: "후행 추종형",
- emoji: "❗",
- description: "인간지표 높을 때 매수 → 손실",
+ type: '후행 추종형',
+ emoji: '❗',
+ description: '인간지표 높을 때 매수 → 손실',
background: theme.colors.sub_blue9,
- }
-] as const;
\ No newline at end of file
+ },
+] as const;
diff --git a/src/controllers/auth/api.ts b/src/controllers/auth/api.ts
index 05577ffb..81f5cec8 100644
--- a/src/controllers/auth/api.ts
+++ b/src/controllers/auth/api.ts
@@ -1,4 +1,4 @@
-import { fetchAuthData, fetchData, Headers, baseURL, wait } from '@controllers/common/base';
+import { Headers, baseURL, fetchAuthData, fetchData, wait } from '@controllers/common/base';
export type ProviderKey = 'kakao' | 'google' | 'naver' | 'apple';
diff --git a/src/controllers/common/base.ts b/src/controllers/common/base.ts
index e773c275..2b56c564 100644
--- a/src/controllers/common/base.ts
+++ b/src/controllers/common/base.ts
@@ -34,7 +34,7 @@ const fetchData = async (path: string, init: RequestInit = {}, isFormData: boole
const fetchAuthData = async (path: string, init: RequestInit = {}, isFormData: boolean = false) => {
try {
const url = `${baseURL}${path}`;
- let token = localStorage.getItem('access_token');
+ const token = localStorage.getItem('access_token');
let res = await fetch(url, {
method: 'GET',
...init,
diff --git a/src/controllers/common/query.ts b/src/controllers/common/query.ts
index 6409851a..f0ae0e73 100644
--- a/src/controllers/common/query.ts
+++ b/src/controllers/common/query.ts
@@ -12,4 +12,3 @@ export const STOCK_FETCH_FUNCTIONS: Record Prom
DESCENT: fetchDescentStocks,
RELATED: () => Promise.resolve([]),
};
-
diff --git a/src/controllers/experiment/query.ts b/src/controllers/experiment/query.ts
index 52ff0c55..a7e1b229 100644
--- a/src/controllers/experiment/query.ts
+++ b/src/controllers/experiment/query.ts
@@ -1,5 +1,6 @@
import { useMutation, useQuery, useQueryClient } from 'react-query';
import { StockCountryKey } from '@ts/StockCountry';
+import { StockSectorKey } from '@ts/StockSector';
import { queryOptions } from '@controllers/common/query';
import {
fetchBuyExperiment,
@@ -9,7 +10,6 @@ import {
fetchPortfolioResult,
fetchSectorRecommend,
} from './api';
-import { StockSectorKey } from '@ts/StockSector';
// ----- Queries -----
export const useExperimentStatusQuery = () => {
@@ -53,7 +53,6 @@ export const useBuyExperimentMutation = () => {
);
};
-
export const useSectorRecommendQuery = (country: StockCountryKey, sectorKey: StockSectorKey | undefined) => {
return useQuery(['sectorRecommend', country, sectorKey], () => fetchSectorRecommend(country, sectorKey!), {
...queryOptions,
diff --git a/src/controllers/stocks/types.ts b/src/controllers/stocks/types.ts
index 7768d7e9..cb5e7aa5 100644
--- a/src/controllers/stocks/types.ts
+++ b/src/controllers/stocks/types.ts
@@ -105,4 +105,3 @@ export interface StockPreferenceStatus {
isBookmarked: boolean;
isNotificationOn: boolean;
}
-
diff --git a/src/hooks/useCanvas.ts b/src/hooks/useCanvas.ts
index fd4c3bb9..b9e947e7 100644
--- a/src/hooks/useCanvas.ts
+++ b/src/hooks/useCanvas.ts
@@ -1,4 +1,4 @@
-import { useRef, useEffect } from 'react';
+import { useEffect, useRef } from 'react';
const useCanvas = (setCanvas: (canvas: HTMLCanvasElement) => void) => {
const canvasRef = useRef(null);
diff --git a/src/hooks/useLocalStorageState.ts b/src/hooks/useLocalStorageState.ts
index 593c2887..89d53789 100644
--- a/src/hooks/useLocalStorageState.ts
+++ b/src/hooks/useLocalStorageState.ts
@@ -1,4 +1,4 @@
-import { useState, useEffect } from 'react';
+import { useEffect, useState } from 'react';
type LocalStorageKey =
| 'access_token'
diff --git a/src/hooks/useSocialAuth.ts b/src/hooks/useSocialAuth.ts
index dc0c3764..d07a487b 100644
--- a/src/hooks/useSocialAuth.ts
+++ b/src/hooks/useSocialAuth.ts
@@ -1,11 +1,11 @@
import { useCallback, useEffect, useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
-import { AUTH_CONFIGS, URL_SCHEME, type SocialProvider } from '../config/oauth';
+import { webPath } from '@router/index';
+import { type ProviderKey, fetchOAuth2Login } from '@controllers/auth/api';
+import { AUTH_CONFIGS, type SocialProvider, URL_SCHEME } from '../config/oauth';
import { MESSAGE_TYPES } from '../config/webview';
-import { fetchOAuth2Login, type ProviderKey } from '@controllers/auth/api';
import useAuthInfo from './useAuthInfo';
import useLocalStorageState from './useLocalStorageState';
-import { webPath } from '@router/index';
interface OAuthState {
csrf: string;
@@ -69,13 +69,13 @@ export const useSocialAuth = () => {
type: MESSAGE_TYPES.OPEN_EXTERNAL_BROWSER,
provider: provider,
url,
- })
+ }),
);
} else {
window.location.href = url;
}
},
- [isWebView]
+ [isWebView],
);
const handleOAuthCallback = useCallback(
@@ -103,7 +103,7 @@ export const useSocialAuth = () => {
type: MESSAGE_TYPES.NEED_REGISTER,
email: res.email,
provider,
- })
+ }),
);
return;
}
@@ -132,8 +132,8 @@ export const useSocialAuth = () => {
(window as any).ReactNativeWebView.postMessage(
JSON.stringify({
type: MESSAGE_TYPES.TOKEN,
- token: res.access_token
- })
+ token: res.access_token,
+ }),
);
}
@@ -161,7 +161,7 @@ export const useSocialAuth = () => {
setIsLoading(false);
}
},
- [isWebView, location.pathname, navigate, setAuthInfo, setRecentProvider, clearAuthInfo]
+ [isWebView, location.pathname, navigate, setAuthInfo, setRecentProvider, clearAuthInfo],
);
const handleWebViewMessage = useCallback(
@@ -183,7 +183,7 @@ export const useSocialAuth = () => {
console.error('Error parsing web message:', error);
}
},
- [handleOAuthCallback]
+ [handleOAuthCallback],
);
// URL에서 OAuth 콜백 처리
@@ -195,9 +195,7 @@ export const useSocialAuth = () => {
if (error) {
console.error('OAuth error:', error);
- const parsedState: OAuthState = stateParam
- ? JSON.parse(atob(stateParam))
- : {};
+ const parsedState: OAuthState = stateParam ? JSON.parse(atob(stateParam)) : {};
if (parsedState?.fromWebView) {
window.location.href = `${URL_SCHEME}?error=${encodeURIComponent(error)}`;
diff --git a/src/hooks/useWorker.ts b/src/hooks/useWorker.ts
index b9d15b3f..4da3dddb 100644
--- a/src/hooks/useWorker.ts
+++ b/src/hooks/useWorker.ts
@@ -1,5 +1,5 @@
// useWorker.ts
-import { useEffect, useState, useRef, useCallback } from 'react';
+import { useCallback, useEffect, useRef, useState } from 'react';
type UseWorkerResult = [result: any, postMessage: (message: any) => void];
diff --git a/src/index.css b/src/index.css
index 9b4ba3c0..ff68c993 100644
--- a/src/index.css
+++ b/src/index.css
@@ -43,8 +43,8 @@ body {
} */
html {
- margin: 0px;
zoom: 1; /* 기본 줌 설정 */
+ margin: 0px;
}
body {
diff --git a/src/layout/Mainlayout/Mainlayout.tsx b/src/layout/Mainlayout/Mainlayout.tsx
index 73637aea..f8149810 100644
--- a/src/layout/Mainlayout/Mainlayout.tsx
+++ b/src/layout/Mainlayout/Mainlayout.tsx
@@ -14,15 +14,7 @@ const Mainlayout = ({ children }: LayoutProps) => {
const isRootPage = location.pathname === '/';
const isBottomNavigationVisible = (
- [
- 'login',
- 'register',
- 'editProfile',
- 'withdraw',
- 'term',
- 'usage',
- 'notification',
- ] as (keyof typeof webPath)[]
+ ['login', 'register', 'editProfile', 'withdraw', 'term', 'usage', 'notification'] as (keyof typeof webPath)[]
).reduce((acc, path) => {
return acc && !location.pathname.startsWith(webPath[path]());
}, true);
diff --git a/src/pages/Lab/Step/Purchase/Purchase.tsx b/src/pages/Lab/Step/Purchase/Purchase.tsx
index 4b7c0039..67ccd78c 100644
--- a/src/pages/Lab/Step/Purchase/Purchase.tsx
+++ b/src/pages/Lab/Step/Purchase/Purchase.tsx
@@ -6,9 +6,10 @@ import { diffToValue } from '@utils/ScoreConvert';
import useToast from '@hooks/useToast';
import { webPath } from '@router/index';
import StockImage from '@components/Common/StockImage';
-import { StockDetailInfo } from '@controllers/stocks/types';
+import { SectorRecommendStockInfo } from '@controllers/experiment/api';
import { useBuyExperimentMutation, useSectorRecommendQuery } from '@controllers/experiment/query';
import { stockInfoQueries } from '@controllers/stocks/query';
+import { StockDetailInfo } from '@controllers/stocks/types';
import CheckSVG from '@assets/icons/check.svg?react';
import DownSVG from '@assets/icons/down.svg?react';
import UpSVG from '@assets/icons/up.svg?react';
@@ -21,7 +22,6 @@ import {
LabPurchaseGridItemText,
LabPurchaseToast,
} from './Purchase.Style';
-import { SectorRecommendStockInfo } from '@controllers/experiment/api';
const priceToText = (price: number, country: StockCountryKey) => {
const _price = price.toLocaleString();
@@ -44,13 +44,13 @@ const LabPurchase = () => {
} = location.state; // 섹터 키 배열
const [selectedSector, setSelectedSector] = useState(selectedSectorKeys?.[0]); // 첫 번째 섹터를 기본 선택
- const selectedStockInfos = ((stockInfoQueries(selectedStocks) ?? []).map((query) => query.data).filter(Boolean) ?? []) as StockDetailInfo[];
+ const selectedStockInfos = ((stockInfoQueries(selectedStocks) ?? []).map((query) => query.data).filter(Boolean) ??
+ []) as StockDetailInfo[];
const [purchased, setPurchased] = useState([]);
const { mutate: buyExperiment } = useBuyExperimentMutation();
const { data: sectorRecommendStockInfo } = useSectorRecommendQuery(selectedCountry, selectedSector);
-
const { toast, showToast } = useToast();
const handlePrevStep = () => {
navigate(-1);
diff --git a/src/pages/Lab/Step/Search/Search.tsx b/src/pages/Lab/Step/Search/Search.tsx
index 2789f28c..7db982ce 100644
--- a/src/pages/Lab/Step/Search/Search.tsx
+++ b/src/pages/Lab/Step/Search/Search.tsx
@@ -6,8 +6,8 @@ import { diffToValue } from '@utils/ScoreConvert';
import useToast from '@hooks/useToast';
import { webPath } from '@router/index';
import StockImage from '@components/Common/StockImage';
-import { AutoCompleteStockItem, StockDetailInfo } from '@controllers/stocks/types';
import { useAutoCompleteStockQuery, usePopularStockFetchQuery } from '@controllers/stocks/query';
+import { AutoCompleteStockItem, StockDetailInfo } from '@controllers/stocks/types';
import AlertSVG from '@assets/icons/alert.svg?react';
import ChevronLeftNarrowSVG from '@assets/icons/chevronLeftNarrow.svg?react';
import CrossSVG from '@assets/icons/cross.svg?react';
@@ -60,7 +60,7 @@ const LabSearchModal = ({
const searchedStocks = useMemo(
() => allStocks.filter((stock: AutoCompleteStockItem) => stock.country === selectedCountry),
- [allStocks, selectedCountry]
+ [allStocks, selectedCountry],
);
const hasSearchValue = !!value;
@@ -193,11 +193,7 @@ interface LabSearchLocationState {
const LabSearch = () => {
const navigate = useNavigate();
const location = useLocation();
- const {
- step,
- country = 'KOREA',
- isOpenModal = false,
- } = (location.state as LabSearchLocationState) || {};
+ const { step, country = 'KOREA', isOpenModal = false } = (location.state as LabSearchLocationState) || {};
const showModalTimeoutRef = useRef(null);
diff --git a/src/pages/Login/Login.tsx b/src/pages/Login/Login.tsx
index c5254c06..ed8a361f 100644
--- a/src/pages/Login/Login.tsx
+++ b/src/pages/Login/Login.tsx
@@ -1,13 +1,13 @@
import { useNavigate } from 'react-router-dom';
import useLocalStorageState from '@hooks/useLocalStorageState';
import { useSocialAuth } from '@hooks/useSocialAuth';
-import { SOCIAL_PROVIDER } from '../../config/oauth';
import CloseSVG from '@assets/close.svg?react';
import AppleLoginSVG from '@assets/login/apple.svg?react';
import GoogleLoginSVG from '@assets/login/google.svg?react';
import KakaoLoginSVG from '@assets/login/kakao.svg?react';
import NaverLoginSVG from '@assets/login/naver.svg?react';
import LogoWithTitleWhiteSVG from '@assets/logo_with_title_white.svg?react';
+import { SOCIAL_PROVIDER } from '../../config/oauth';
import {
LoginBannerContainer,
LoginBannerContents,
diff --git a/src/pages/OAuthCallback/OAuthCallback.Style.ts b/src/pages/OAuthCallback/OAuthCallback.Style.ts
index 2e9a8365..27c4f028 100644
--- a/src/pages/OAuthCallback/OAuthCallback.Style.ts
+++ b/src/pages/OAuthCallback/OAuthCallback.Style.ts
@@ -27,7 +27,7 @@ const StatusTitle = styled.p({
fontSize: '20px',
fontWeight: 600,
textAlign: 'center',
- color: theme.colors.sub_white
+ color: theme.colors.sub_white,
});
const StatusDesc = styled.p({
diff --git a/src/pages/OAuthCallback/OAuthCallback.tsx b/src/pages/OAuthCallback/OAuthCallback.tsx
index 2b6e9953..5087d2d2 100644
--- a/src/pages/OAuthCallback/OAuthCallback.tsx
+++ b/src/pages/OAuthCallback/OAuthCallback.tsx
@@ -1,7 +1,7 @@
import { useSocialAuth } from '@hooks/useSocialAuth';
-import Loading from '@assets/loading.png';
import BlueAlert from '@assets/blueAlert.svg?react';
-import { OAuthCallbackContainer, StatusTitle, StatusDesc } from './OAuthCallback.Style';
+import Loading from '@assets/loading.png';
+import { OAuthCallbackContainer, StatusDesc, StatusTitle } from './OAuthCallback.Style';
const OAuthCallback = () => {
const { error } = useSocialAuth();
diff --git a/src/pages/Search/Search.Style.ts b/src/pages/Search/Search.Style.ts
index 55eccbe2..a404918a 100644
--- a/src/pages/Search/Search.Style.ts
+++ b/src/pages/Search/Search.Style.ts
@@ -144,7 +144,7 @@ const SentimentContent = styled.div({
...theme.font.body14Medium,
display: 'flex',
flexDirection: 'column',
- gap: '2px'
+ gap: '2px',
});
const SentimentDesc = styled.p({
diff --git a/src/pages/Search/Search.tsx b/src/pages/Search/Search.tsx
index ef394f56..330d9785 100644
--- a/src/pages/Search/Search.tsx
+++ b/src/pages/Search/Search.tsx
@@ -11,7 +11,12 @@ import GuageChart from '@components/Search/GuageChart/GuageChart';
import SearchTitle from '@components/Search/SearchTitle/SearchTitle';
import StockChart from '@components/Search/StockChart/StockChart';
import StockWordCloud from '@components/Search/StockWordCloud/StockWordCloud';
-import { useRelevantStockFetchQuery, useScoreQuery, useStockSummaryQuery, useSymbolNameSearchQuery } from '@controllers/stocks/query';
+import {
+ useRelevantStockFetchQuery,
+ useScoreQuery,
+ useStockSummaryQuery,
+ useSymbolNameSearchQuery,
+} from '@controllers/stocks/query';
import { StockDetailInfo, StockInfo } from '@controllers/stocks/types';
import InfoSVG from '@assets/icons/info.svg?react';
import {
@@ -19,6 +24,7 @@ import {
SearchResultAlertContainer,
SearchResultChartContainer,
SearchResultChartContents,
+ SearchResultCompanyInfoContainer,
SearchResultContainer,
SearchResultContents,
SearchResultGaugeChartContainer,
@@ -28,11 +34,10 @@ import {
SearchResultTabLabel,
SearchResultWordCloudContainer,
SearchResultWordCloudContents,
- SearchResultCompanyInfoContainer,
- SentimentSection,
- SentimentTitle,
SentimentContent,
SentimentDesc,
+ SentimentSection,
+ SentimentTitle,
} from './Search.Style';
type TabKey = 'HUMAN_INDEX' | 'STOCK_CHART' | 'KEYWORD' | 'COMPANY_INFO';
@@ -76,8 +81,12 @@ const SearchResultGaugeChart = ({ stockInfo: { stockId, country, symbolName } }:
-
({industry}) 산업의 평균은 {industryAverage}점 이며,
-
({symbolName})는 상위 {ranking}% 입니다.
+
+ ({industry}) 산업의 평균은 {industryAverage}점 이며,
+
+
+ ({symbolName})는 상위 {ranking}% 입니다.
+
@@ -89,11 +98,10 @@ const SearchResultGaugeChart = ({ stockInfo: { stockId, country, symbolName } }:
종목 분위기
- ▲ 최근 한달 평균 대비 {scoreDiff > 0 ? '+' : ''}{scoreDiff}점
-
-
- 해당 종목의 한 달 간의 평균 값은 ({monthlyAverage})점 입니다.
+ ▲ 최근 한달 평균 대비 {scoreDiff > 0 ? '+' : ''}
+ {scoreDiff}점
+ 해당 종목의 한 달 간의 평균 값은 ({monthlyAverage})점 입니다.
({symbolName})에 대한 투자자들의 심리가 {sentiment} 있어요.
diff --git a/src/router/index.tsx b/src/router/index.tsx
index 5dfa577d..65715204 100644
--- a/src/router/index.tsx
+++ b/src/router/index.tsx
@@ -9,13 +9,13 @@ import Done from '@pages/MyPage/Done/Done';
import EditProfile from '@pages/MyPage/Edit/Edit';
import MyPage from '@pages/MyPage/MyPage';
import NotificationPage from '@pages/Notification/Notification';
+import OAuthCallback from '@pages/OAuthCallback/OAuthCallback';
import Register from '@pages/Register/Register';
import ShortView from '@pages/ShortView/ShortView';
import Term from '@pages/Term/Term';
import Usage from '@pages/Usage/Usage';
import Withdraw from '@pages/Withdraw/Withdraw';
import WithdrawDone from '@pages/WithdrawDone/WithdrawDone';
-import OAuthCallback from '@pages/OAuthCallback/OAuthCallback';
import Mainlayout from '../layout/Mainlayout/Mainlayout';
import Home from '../pages/Home/Home';
import Search from '../pages/Search/Search';
diff --git a/src/utils/Canvas.ts b/src/utils/Canvas.ts
index cb1cc42c..ca40ba02 100644
--- a/src/utils/Canvas.ts
+++ b/src/utils/Canvas.ts
@@ -6,8 +6,7 @@ export const drawLine = (ctx: any, pathList: any) => {
ctx.stroke(
new Path2D(
pathList.reduce(
- (acc: any, [x, y]: [number, number], i: number) =>
- acc + `${i ? 'L' : 'M'} ${DPR * x} ${DPR * y} `,
+ (acc: any, [x, y]: [number, number], i: number) => acc + `${i ? 'L' : 'M'} ${DPR * x} ${DPR * y} `,
'',
),
),
diff --git a/src/utils/Date.ts b/src/utils/Date.ts
index 19ae99ef..f99a7636 100644
--- a/src/utils/Date.ts
+++ b/src/utils/Date.ts
@@ -1,17 +1,13 @@
import { DAY_TYPE } from '@ts/Types';
export const formatLocalDateToDate = (localDate: string) => {
- const date = new Date(
- `${localDate.substr(0, 4)}-${localDate.substr(4, 2)}-${localDate.substr(6, 2)}`,
- );
+ const date = new Date(`${localDate.substr(0, 4)}-${localDate.substr(4, 2)}-${localDate.substr(6, 2)}`);
return date;
};
/// 2024-04-12
export const formatDateISO = (date: Date) => {
- const [day, month, year] = (['getDate', 'getMonth', 'getFullYear'] as const).map((fn) =>
- date[fn](),
- );
+ const [day, month, year] = (['getDate', 'getMonth', 'getFullYear'] as const).map((fn) => date[fn]());
return `${year}-${(month + 1).toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
};
diff --git a/src/utils/Delta.ts b/src/utils/Delta.ts
index 16678266..c8a416e7 100644
--- a/src/utils/Delta.ts
+++ b/src/utils/Delta.ts
@@ -1,4 +1,3 @@
import { themeColor } from '@styles/themes';
-export const deltaColor = (delta: number): themeColor =>
- !delta ? 'grayscale50' : delta > 0 ? 'red' : 'blue';
+export const deltaColor = (delta: number): themeColor => (!delta ? 'grayscale50' : delta > 0 ? 'red' : 'blue');
diff --git a/src/utils/dateFormatter.ts b/src/utils/dateFormatter.ts
index ca30d509..d405d822 100644
--- a/src/utils/dateFormatter.ts
+++ b/src/utils/dateFormatter.ts
@@ -31,7 +31,7 @@ export const toDate = (dateInput: Date | string | number[]): Date => {
dateInput[2],
dateInput[3] || 0,
dateInput[4] || 0,
- dateInput[5] || 0
+ dateInput[5] || 0,
);
}
return new Date(dateInput);
diff --git a/src/utils/getBusinessDaysLater.ts b/src/utils/getBusinessDaysLater.ts
index ac1326dc..30bdd39a 100644
--- a/src/utils/getBusinessDaysLater.ts
+++ b/src/utils/getBusinessDaysLater.ts
@@ -1,17 +1,34 @@
-
const stockHolidays2025: Record = {
KOREA: [
- '2025-01-01', '2025-01-28', '2025-01-29', '2025-01-30',
- '2025-03-03', '2025-05-01', '2025-05-05', '2025-05-06',
- '2025-06-06', '2025-08-15', '2025-10-03',
- '2025-10-06', '2025-10-07', '2025-10-08', '2025-10-09',
- '2025-12-25', '2025-12-31'
+ '2025-01-01',
+ '2025-01-28',
+ '2025-01-29',
+ '2025-01-30',
+ '2025-03-03',
+ '2025-05-01',
+ '2025-05-05',
+ '2025-05-06',
+ '2025-06-06',
+ '2025-08-15',
+ '2025-10-03',
+ '2025-10-06',
+ '2025-10-07',
+ '2025-10-08',
+ '2025-10-09',
+ '2025-12-25',
+ '2025-12-31',
],
OVERSEA: [
- '2025-01-01', '2025-01-20', '2025-02-17', '2025-04-18',
- '2025-05-26', '2025-07-04', '2025-09-01', '2025-11-27',
- '2025-12-25'
- ]
+ '2025-01-01',
+ '2025-01-20',
+ '2025-02-17',
+ '2025-04-18',
+ '2025-05-26',
+ '2025-07-04',
+ '2025-09-01',
+ '2025-11-27',
+ '2025-12-25',
+ ],
};
const isHoliday = (date: Date, country: string): boolean => {
@@ -20,11 +37,7 @@ const isHoliday = (date: Date, country: string): boolean => {
return day === 0 || day === 6 || stockHolidays2025[country].includes(iso);
};
-export const getBusinessDaysLater = (
- startDate: Date,
- days: number,
- country: string
-): string => {
+export const getBusinessDaysLater = (startDate: Date, days: number, country: string): string => {
let count = 0;
let current = new Date(startDate);
@@ -36,4 +49,4 @@ export const getBusinessDaysLater = (
}
return `${current.getMonth() + 1}월 ${current.getDate()}일`;
-};
\ No newline at end of file
+};
diff --git a/src/utils/humanIndexUtils.ts b/src/utils/humanIndexUtils.ts
index 7569c360..9b88d9ff 100644
--- a/src/utils/humanIndexUtils.ts
+++ b/src/utils/humanIndexUtils.ts
@@ -1,26 +1,38 @@
-import { theme } from "@styles/themes";
+import { theme } from '@styles/themes';
// 타입별 이모지 매핑
export const getTypeEmoji = (type: string): string => {
switch (type) {
- case '완전 인간 아님': return '😱';
- case '인간 아님': return '🙁';
- case '평범 인간': return '😐';
- case '인간 맞음': return '☺️';
- case '인간 완전 맞음': return '😆';
- default: return '🚨';
+ case '완전 인간 아님':
+ return '😱';
+ case '인간 아님':
+ return '🙁';
+ case '평범 인간':
+ return '😐';
+ case '인간 맞음':
+ return '☺️';
+ case '인간 완전 맞음':
+ return '😆';
+ default:
+ return '🚨';
}
};
// 점수대별 배경 색상 매핑
export const getTypeColor = (type: string): string => {
switch (type) {
- case '완전 인간 아님': return theme.colors.red;
- case '인간 아님': return theme.colors.red;
- case '평범 인간': return theme.colors.sub_gray9;
- case '인간 맞음': return theme.colors.sub_gray1;
- case '인간 완전 맞음': return theme.colors.sub_gray1;
- default: return theme.colors.sub_gray1;
+ case '완전 인간 아님':
+ return theme.colors.red;
+ case '인간 아님':
+ return theme.colors.red;
+ case '평범 인간':
+ return theme.colors.sub_gray9;
+ case '인간 맞음':
+ return theme.colors.sub_gray1;
+ case '인간 완전 맞음':
+ return theme.colors.sub_gray1;
+ default:
+ return theme.colors.sub_gray1;
}
};
@@ -52,4 +64,4 @@ export const calculateSuccessRate = (profitCount: number, totalCount: number): s
if (rate >= 40) return '40~60%';
if (rate >= 20) return '20~40%';
return '0~20%';
-};
\ No newline at end of file
+};
diff --git a/src/utils/test.js b/src/utils/test.js
index 1ae890ac..42bb1d6c 100644
--- a/src/utils/test.js
+++ b/src/utils/test.js
@@ -11,10 +11,10 @@
function e(a) {
if (r[a]) return r[a].exports;
var n = (r[a] = { exports: {}, id: a, loaded: !1 });
- return t[a].call(n.exports, n, n.exports, e), (n.loaded = !0), n.exports;
+ return (t[a].call(n.exports, n, n.exports, e), (n.loaded = !0), n.exports);
}
var r = {};
- return (e.m = t), (e.c = r), (e.p = '/'), e(0);
+ return ((e.m = t), (e.c = r), (e.p = '/'), e(0));
})([
function (t, e, r) {
'use strict';
@@ -32,11 +32,11 @@
},
function (t, e) {
'use strict';
- Object.defineProperty(e, '__esModule', { value: !0 }),
+ (Object.defineProperty(e, '__esModule', { value: !0 }),
(e['default'] = function (t) {
var e = void 0,
r = function a(r) {
- (e = requestAnimationFrame(a)), t(r);
+ ((e = requestAnimationFrame(a)), t(r));
};
return (
r(0),
@@ -44,7 +44,7 @@
return cancelAnimationFrame(e);
}
);
- });
+ }));
},
function (t, e, r) {
'use strict';
@@ -62,7 +62,11 @@
d = 2,
s = function (t, e, r, a) {
var n,
- l = ((n = ((n = o.append.call(t, 'g')), o.attr).call(n, 'id', 'digit-' + a)), o.style).call(n, 'filter', 'url(#motionFilter-' + a + ')');
+ l = ((n = ((n = o.append.call(t, 'g')), o.attr).call(n, 'id', 'digit-' + a)), o.style).call(
+ n,
+ 'filter',
+ 'url(#motionFilter-' + a + ')',
+ );
return (
u.forEach(function (t, a) {
var n;
@@ -73,11 +77,12 @@
},
p = function (t, e) {
var r;
- return ((r = ((r = ((r = ((r = ((r = ((r = ((r = o.append.call(t, 'filter')), o.attr).call(r, 'id', 'motionFilter-' + e)), o.attr).call(
+ return ((r = ((r = ((r = ((r = ((r = ((r = ((r = o.append.call(t, 'filter')), o.attr).call(
r,
- 'width',
- '300%',
+ 'id',
+ 'motionFilter-' + e,
)),
+ o.attr).call(r, 'width', '300%')),
o.attr).call(r, 'x', '-100%')),
o.append).call(r, 'feGaussianBlur')),
o.attr).call(r, 'class', 'blurValues')),
@@ -86,22 +91,30 @@
},
v = function (t) {
var e;
- return ((e = ((e = ((e = ((e = ((e = o.append.call(t, 'filter')), o.attr).call(e, 'id', 'createShadowFailFilter')), o.attr).call(e, 'width', '300%')),
+ return ((e = ((e = ((e = ((e = ((e = o.append.call(t, 'filter')), o.attr).call(
+ e,
+ 'id',
+ 'createShadowFailFilter',
+ )),
+ o.attr).call(e, 'width', '300%')),
o.attr).call(e, 'x', '-100%')),
o.append).call(e, 'feGaussianBlur')),
o.attr).call(e, 'stdDeviation', '0 0');
},
y = function (t, e) {
var r;
- return ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r =
- o.append.call(t, 'linearGradient')),
- o.attr).call(r, 'id', 'gradient-' + e)),
- o.attr).call(r, 'x1', '0%')),
- o.attr).call(r, 'y1', '0%')),
- o.attr).call(r, 'x2', '0%')),
- o.attr).call(r, 'y2', '100%')),
- o.append).call(r, 'stop')),
- o.attr).call(r, 'offset', '0')),
+ return ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r = ((r =
+ ((r = ((r = ((r = ((r = ((r = ((r = ((r = o.append.call(t, 'linearGradient')), o.attr).call(
+ r,
+ 'id',
+ 'gradient-' + e,
+ )),
+ o.attr).call(r, 'x1', '0%')),
+ o.attr).call(r, 'y1', '0%')),
+ o.attr).call(r, 'x2', '0%')),
+ o.attr).call(r, 'y2', '100%')),
+ o.append).call(r, 'stop')),
+ o.attr).call(r, 'offset', '0')),
o.attr).call(r, 'stop-color', 'white')),
o.attr).call(r, 'stop-opacity', '0')),
o.select).call(r, '#gradient-' + e)),
@@ -122,7 +135,12 @@
},
h = function (t, e) {
var r;
- return ((r = ((r = ((r = ((r = ((r = ((r = ((r = o.append.call(t, 'mask')), o.attr).call(r, 'id', 'mask-' + e)), o.append).call(r, 'rect')),
+ return ((r = ((r = ((r = ((r = ((r = ((r = ((r = o.append.call(t, 'mask')), o.attr).call(
+ r,
+ 'id',
+ 'mask-' + e,
+ )),
+ o.append).call(r, 'rect')),
o.attr).call(r, 'x', 0)),
o.attr).call(r, 'y', 0)),
o.attr).call(r, 'width', '100%')),
@@ -131,11 +149,12 @@
},
m = function (t, e, r) {
var a;
- return ((a = ((a = ((a = o.attr.call(t, 'width', e)), o.attr).call(a, 'height', r)), o.attr).call(a, 'viewBox', '0 0 ' + e + ' ' + r)), o.style).call(
+ return ((a = ((a = ((a = o.attr.call(t, 'width', e)), o.attr).call(a, 'height', r)), o.attr).call(
a,
- 'overflow',
- 'hidden',
- );
+ 'viewBox',
+ '0 0 ' + e + ' ' + r,
+ )),
+ o.style).call(a, 'overflow', 'hidden');
};
e['default'] = function (t) {
var e,
@@ -162,12 +181,19 @@
var A = o.append.call(O, 'svg'),
G = ((e = o.append.call(A, 'svg')), o.attr).call(e, 'mask', 'url(#mask-' + F + ')'),
C = o.append.call(A, 'defs');
- y(C, F), h(C, F), v(C);
+ (y(C, F), h(C, F), v(C));
var H = String(a).replace(/ /g, ' ').split(''),
q = String(n).replace(/ /g, ' ').split(''),
z = q.map(function (t, e) {
var r = e + '-' + F;
- return { id: r, node: s(G, S, g, r), filter: p(C, r), from: u.indexOf(H[e]), value: u.indexOf(t), offset: { x: 0, y: E } };
+ return {
+ id: r,
+ node: s(G, S, g, r),
+ filter: p(C, r),
+ from: u.indexOf(H[e]),
+ value: u.indexOf(t),
+ offset: { x: 0, y: E },
+ };
}),
I = [];
z.forEach(function (t, e) {
@@ -179,7 +205,8 @@
delay: (z.length - 1 - e) * w + j,
step: function (e) {
var n;
- (t.offset.y = E + (e % (S * g * f))), ((n = t.node), o.attr).call(n, 'transform', 'translate(' + t.offset.x + ', ' + t.offset.y + ')');
+ ((t.offset.y = E + (e % (S * g * f))),
+ ((n = t.node), o.attr).call(n, 'transform', 'translate(' + t.offset.x + ', ' + t.offset.y + ')'));
var l = (a - r) / 2,
i = Math.abs(Math.abs(e - r - l) - l) / 100;
((n = t.filter), o.attr).call(n, 'stdDeviation', '0 ' + i);
@@ -196,11 +223,11 @@
I.push(n);
});
var L = function (t) {
- (B = 0),
+ ((B = 0),
z.forEach(function (t) {
var e = t.node.getBBox(),
r = e.width;
- (t.offset.x = B), (B += r + _);
+ ((t.offset.x = B), (B += r + _));
}),
z.forEach(function (t) {
var e;
@@ -209,7 +236,7 @@
m(A, B, k),
I.forEach(function (e) {
return e.update(t);
- });
+ }));
},
N = (0, l['default'])(L);
return N;
@@ -220,20 +247,20 @@
function a(t) {
return t && t.__esModule ? t : { default: t };
}
- Object.defineProperty(e, '__esModule', { value: !0 }),
+ (Object.defineProperty(e, '__esModule', { value: !0 }),
(e['default'] = function (t) {
var e = document.createElementNS(l['default'].svg, t);
- return this.appendChild(e), e;
- });
+ return (this.appendChild(e), e);
+ }));
var n = r(6),
l = a(n);
},
function (t, e) {
'use strict';
- Object.defineProperty(e, '__esModule', { value: !0 }),
+ (Object.defineProperty(e, '__esModule', { value: !0 }),
(e['default'] = function (t, e) {
- return this.setAttribute(t, e), this;
- });
+ return (this.setAttribute(t, e), this);
+ }));
},
function (t, e, r) {
'use strict';
@@ -279,29 +306,29 @@
},
function (t, e) {
'use strict';
- Object.defineProperty(e, '__esModule', { value: !0 }), (e['default'] = { svg: 'http://www.w3.org/2000/svg' });
+ (Object.defineProperty(e, '__esModule', { value: !0 }), (e['default'] = { svg: 'http://www.w3.org/2000/svg' }));
},
function (t, e) {
'use strict';
- Object.defineProperty(e, '__esModule', { value: !0 }),
+ (Object.defineProperty(e, '__esModule', { value: !0 }),
(e['default'] = function (t) {
return t === String(t) ? document.querySelector(t) : t;
- });
+ }));
},
function (t, e) {
'use strict';
- Object.defineProperty(e, '__esModule', { value: !0 }),
+ (Object.defineProperty(e, '__esModule', { value: !0 }),
(e['default'] = function (t, e) {
var r = arguments.length <= 2 || void 0 === arguments[2] ? '' : arguments[2];
- return this.style.setProperty(t, e, r), this;
- });
+ return (this.style.setProperty(t, e, r), this);
+ }));
},
function (t, e) {
'use strict';
- Object.defineProperty(e, '__esModule', { value: !0 }),
+ (Object.defineProperty(e, '__esModule', { value: !0 }),
(e['default'] = function (t) {
- return (this.textContent = t), this;
- });
+ return ((this.textContent = t), this);
+ }));
},
function (t, e) {
'use strict';
@@ -346,7 +373,7 @@
if (!g) {
m || ((m = t), d(h));
var r = Math.min(Math.max(t - m - i, 0), l) / l;
- (h = u(r) * (a - e) + e), p(h), 1 === r && ((g = !0), y(h));
+ ((h = u(r) * (a - e) + e), p(h), 1 === r && ((g = !0), y(h)));
}
};
return { update: b };