Skip to content
Snippets Groups Projects
Commit c1f2b4f1 authored by 화균 김's avatar 화균 김
Browse files

remove: delete unused files

parent 0898f6d5
No related branches found
No related tags found
No related merge requests found
import styled from "styled-components";
export const StyledSection = styled.section`
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 2rem;
box-sizing: border-box;
position: relative;
overflow: hidden;
`;
export const TopLogo = styled.img`
height: 2.5rem;
`;
export const BottomLogo = styled.img`
max-width: 100%;
height: auto;
`;
export const ScrollSection = styled.section`
flex: 1;
height: auto;
`;
export const PageTitle = styled.h1`
font-size: 2rem;
font-weight: 600;
color: #1361A7;
margin: 0;
margin-top: 1.5rem;
`;
export const DesignBackground = styled.div`
width: 1200px;
height: 1200px;
position: absolute;
bottom: -70%;
left: 50%;
transform: translate(-50%);
border-radius: 1050px;
background-color: #E0E7ED;
z-index: -1;
`;
export const CharacterImg = styled.img`
width: 12rem;
position: fixed;
bottom: 3rem;
right: 1.5rem;
opacity: 0.3;
z-index: 1;
`;
\ No newline at end of file
'use server';
import { getSentence } from "../../../api/request";
export async function TextArea() {
const sentence = await getSentence();
return (
<section className="w-full p-5 flex justify-center items-center">
<span className="text-base leading-normal text-gray-800">
{sentence}
</span>
</section>
);
}
export default TextArea;
\ No newline at end of file
import styled from "styled-components";
export const TextContainer = styled.section`
width: 100%;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
`;
export const Content = styled.span`
font-size: 16px;
line-height: 1.5;
color: #333;
`;
import axios, {
AxiosInstance,
AxiosRequestConfig,
AxiosResponse,
AxiosError,
InternalAxiosRequestConfig
} from 'axios';
// API 응답 타입 정의
export interface ApiResponse<T = any> {
data: T;
status: number;
message: string;
}
// Axios 인스턴스 생성
const axiosInstance: AxiosInstance = axios.create({
baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000',
timeout: 10000,
headers: {
'Content-Type': 'application/json',
},
});
// 요청 인터셉터
axiosInstance.interceptors.request.use(
(config: InternalAxiosRequestConfig) => {
// 토큰이 있는 경우 헤더에 추가
const token = localStorage.getItem('token');
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
return config;
},
(error: AxiosError) => {
return Promise.reject(error);
}
);
// 응답 인터셉터
axiosInstance.interceptors.response.use(
(response: AxiosResponse) => {
return response;
},
(error: AxiosError) => {
// 에러 처리
if (error.response) {
switch (error.response.status) {
case 401:
// 인증 에러 처리
localStorage.removeItem('token');
window.location.href = '/login';
break;
case 403:
// 권한 에러 처리
console.error('접근 권한이 없습니다.');
break;
case 404:
// 리소스 없음
console.error('요청한 리소스를 찾을 수 없습니다.');
break;
case 500:
// 서버 에러
console.error('서버 에러가 발생했습니다.');
break;
default:
console.error('알 수 없는 에러가 발생했습니다.');
}
}
return Promise.reject(error);
}
);
// API 요청 메서드
export const api = {
get: <T>(url: string, config?: AxiosRequestConfig): Promise<ApiResponse<T>> =>
axiosInstance.get(url, config).then((response) => response.data),
post: <T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<ApiResponse<T>> =>
axiosInstance.post(url, data, config).then((response) => response.data),
put: <T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<ApiResponse<T>> =>
axiosInstance.put(url, data, config).then((response) => response.data),
delete: <T>(url: string, config?: AxiosRequestConfig): Promise<ApiResponse<T>> =>
axiosInstance.delete(url, config).then((response) => response.data),
};
export default axiosInstance;
\ No newline at end of file
:root {
font-family: Ajou, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import StyledComponentsRegistry from './registry.tsx';
import { GlobalStyle } from './styles/globalStyles.ts'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<StyledComponentsRegistry>
<GlobalStyle />
<App />
</StyledComponentsRegistry>
</StrictMode>
)
'use client';
import React, { useState } from 'react';
import { ServerStyleSheet, StyleSheetManager } from 'styled-components';
export default function StyledComponentsRegistry({
children,
}: {
children: React.ReactNode;
}) {
const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet());
if (typeof window !== 'undefined') return <>{children}</>;
return (
<StyleSheetManager sheet={styledComponentsStyleSheet.instance}>
{children}
</StyleSheetManager>
);
}
\ No newline at end of file
'use client';
import { createGlobalStyle } from 'styled-components';
export const GlobalStyle = createGlobalStyle`
@font-face {
font-family: 'Ajou';
src: url('/fonts/AjouOTF.otf') format('opentype');
font-weight: normal;
font-style: normal;
font-display: swap;
}
`;
\ No newline at end of file
/// <reference types="vite/client" />
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src"]
}
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
}
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
})
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment