Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
phyuna0525 committed Mar 6, 2025
2 parents 596013e + 055b5f2 commit 619e938
Show file tree
Hide file tree
Showing 49 changed files with 2,811 additions and 4,618 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/gitAction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy

on:
push:
branches:
- main

jobs:
build:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Deploy to xquare
uses: team-xquare/xquare-deployment-action@master
with:
environment: prod
access_key: ${{ secrets.XQUAER_ACCESS_KEY }}
github_token: ${{ secrets.PICK_WEB_TEACHER }}
buildargs: |
VITE_SERVER_BASE_URL=${{ secrets.VITE_SERVER_BASE_URL }}
VITE_PUBLIC_FILE_APP=${{ secrets.VITE_PUBLIC_FILE_APP }}
26 changes: 26 additions & 0 deletions .github/workflows/stagGitAction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: stagDeploy

on:
push:
branches:
- develop

jobs:
build:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Deploy to xquare
uses: team-xquare/xquare-deployment-action@master
with:
environment: stag
access_key: ${{ secrets.XQUAER_ACCESS_KEY }}
github_token: ${{ secrets.PICK_WEB_TEACHER }}
buildargs: |
VITE_SERVER_BASE_URL=${{ secrets.VITE_STAG_SERVER_BASE_URL }}
VITE_PUBLIC_FILE_APP=${{ secrets.VITE_PUBLIC_FILE_APP }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ yarn-debug.log*3
yarn-error.log*

*storybook.log
.vercel
8 changes: 8 additions & 0 deletions .xquare/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config:
name: pick-teacher
service_type: fe
port: 3000
host: 0.0.0.0
domain:
prod: pick-teacher.xquare.app
stag: pick-teacher-stag.xquare.app
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:21.5.0

WORKDIR /user/src

COPY package.json .

RUN yarn

COPY . .

RUN yarn build

EXPOSE 3000

CMD ["yarn", "dev"]

ARG VITE_STAG_SERVER_BASE_URL
ARG VITE_PUBLIC_FILE_APP
ARG VITE_SERVER_BASE_URL

ENV VITE_STAG_SERVER_BASE_URL=${VITE_STAG_SERVER_BASE_URL}
ENV VITE_PUBLIC_FILE_APP=${VITE_PUBLIC_FILE_APP}
ENV VITE_SERVER_BASE_URL=${VITE_SERVER_BASE_URL}
7 changes: 0 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
<!-- End Google Tag Manager -->
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/public/favicon.ico" />
<link
rel="preload"
href="src/assets/fonts/WantedSansVariable.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@
"styled-components": "^6.1.9",
"typescript": "^4.4.2",
"upgrade": "^1.1.0",
"vercel": "^37.8.0",
"vite": "^5.3.1",
"vite-plugin-svgr": "^4.2.0",
"zustand": "^4.5.4"
},
"scripts": {
"start": "vite",
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
Expand All @@ -49,6 +48,7 @@
"@storybook/test": "^8.2.1",
"prop-types": "15.8.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"vite-plugin-env-compatible": "^2.0.1",
"vite-plugin-html": "^3.2.2",
"webpack": "5.92.1"
}
Expand Down
Binary file removed public/font/WantedSans-Black.woff2
Binary file not shown.
Binary file removed public/font/WantedSans-Bold.woff2
Binary file not shown.
Binary file removed public/font/WantedSans-ExtraBlack.woff2
Binary file not shown.
Binary file removed public/font/WantedSans-ExtraBold.woff2
Binary file not shown.
Binary file removed public/font/WantedSans-Medium.woff2
Binary file not shown.
Binary file removed public/font/WantedSans-Regular.woff2
Binary file not shown.
Binary file removed public/font/WantedSans-SemiBold.woff2
Binary file not shown.
Binary file removed public/font/WantedSansVariable.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion src/apis/admin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface Token {
}

export const useLogin = () => {
const BASEURL = import.meta.env.VITE_SERVER_BASE_URL;
const BASEURL = process.env.VITE_SERVER_BASE_URL

const [accessToken, setAccessToken] = useState<string | null>(null);
const [refreshToken, setRefreshToken] = useState<string | null>(null);
Expand Down
2 changes: 1 addition & 1 deletion src/apis/bug/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { instance } from "..";
import { useMutation, MutateOptions } from "@tanstack/react-query";
import { useMutation } from "@tanstack/react-query";
import { BugProp } from "./type";
import { toast } from "react-toastify";

Expand Down
4 changes: 2 additions & 2 deletions src/apis/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cookie } from "@/utils/auth";
import axios, { AxiosError } from "axios";

const BASEURL = import.meta.env.VITE_SERVER_BASE_URL;
const BASEURL = process.env.VITE_SERVER_BASE_URL

export const instance = axios.create({
baseURL: BASEURL,
Expand Down Expand Up @@ -54,7 +54,7 @@ instance.interceptors.response.use(
cookie.set("refresh_token", data.refresh_token);
})
.catch(() => {
window.location.href = "login";
window.location.href = "/";
});
} catch (refreshError) {
return Promise.reject(refreshError);
Expand Down
2 changes: 1 addition & 1 deletion src/apis/self-study/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMutation, useQuery } from "@tanstack/react-query";
import { useQuery } from "@tanstack/react-query";
import { SelfStudTeacher } from "./type";
import { instance } from "..";
import { getFullToday } from "@/utils/date";
Expand Down
Binary file removed src/assets/svg/font/WantedSans-Black.woff2
Binary file not shown.
Binary file removed src/assets/svg/font/WantedSans-Bold.woff2
Binary file not shown.
Binary file removed src/assets/svg/font/WantedSans-ExtraBlack.woff2
Binary file not shown.
Binary file removed src/assets/svg/font/WantedSans-ExtraBold.woff2
Binary file not shown.
Binary file removed src/assets/svg/font/WantedSans-Medium.woff2
Binary file not shown.
Binary file removed src/assets/svg/font/WantedSans-Regular.woff2
Binary file not shown.
Binary file removed src/assets/svg/font/WantedSans-SemiBold.woff2
Binary file not shown.
Binary file removed src/assets/svg/font/WantedSansVariable.woff2
Binary file not shown.
16 changes: 0 additions & 16 deletions src/assets/svg/font/font.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/dropdown/state/stateDrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const StatusDrop = ({ status, onChange }: StatusProps) => {
{ value: "GO_HOME", label: "귀가" },
{ value: "GO_OUT", label: "외출" },
{ value: "PICNIC", label: "현체" },
{ value: "DISALLOWE", label: "무단" },
{ value: "DISALLOWE", label: "결과" },
{ value: "EMPLOYMENT", label: "취업" },
];

Expand Down
67 changes: 0 additions & 67 deletions src/components/header.tsx

This file was deleted.

3 changes: 1 addition & 2 deletions src/components/helfMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { styled } from "styled-components";
import { theme } from "@/styles/theme";
import React, { useState } from "react";
import { useState } from "react";
import HelpContent from "./helfcontent";
import Alarm from "@/assets/svg/alram.svg";
import Face from "@/assets/svg/face.svg";
Expand All @@ -11,7 +11,6 @@ import { cookie } from "@/utils/auth";

const HelfMenu = () => {
const navigate = useNavigate();
const [logoutModal, setLogoutModal] = useState<boolean>(false);

const Logout = () => {
cookie.remove("access_token");
Expand Down
6 changes: 2 additions & 4 deletions src/components/helpMenu/helpMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { styled } from "styled-components";
import { theme } from "@/styles/theme";
import React, { useState } from "react";
import { useState } from "react";
import HelpContent from "../helpContent/helpcontent";
import Alarm from "@/assets/svg/alram.svg";
import Face from "@/assets/svg/face.svg";
import Bug from "@/assets/svg/bug.svg";
import Out from "@/assets/svg/out.svg";
Expand All @@ -11,13 +10,12 @@ import { cookie } from "@/utils/auth";

const HelfMenu = () => {
const navigate = useNavigate();
const [logoutModal, setLogoutModal] = useState<boolean>(false);

const Logout = () => {
cookie.remove("access_token");
cookie.remove("refresh_token");
localStorage.clear();
navigate("/login");
navigate("/");
};

return (
Expand Down
2 changes: 0 additions & 2 deletions src/components/routerButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import moveIcon from "@/assets/svg/moveClass.svg";
import outAccept from "@/assets/svg/outAccept.svg";
import outList from "@/assets/svg/outList.svg";
import pre from "@/assets/svg/previousList.svg";
import after from "@/assets/svg/afterSchool.svg";
import major from "@/assets/svg/majorClub.svg";
import self from "@/assets/svg/selfStudy.svg";
import { Link } from "react-router-dom";
import { styled } from "styled-components";
Expand Down
6 changes: 3 additions & 3 deletions src/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { theme } from "@/styles/theme";
import { styled } from "styled-components";
import MealInfo from "./meal";
import { TodayMeals } from "@/apis/meal";
import { getFullToday, getToday, getWeekDay } from "@/utils/date";
import { getToday } from "@/utils/date";
import { TodaySelfStudyList } from "@/apis/self-study";
import HelfMenu from "./helfMenu";

Expand All @@ -23,12 +23,12 @@ const Sidebar = ({ onClick }: SidebarProp) => {
<MealWrap>
<MealInfo
title="점심"
content={TodayMeal?.meals.lunch.slice(0) || []}
content={TodayMeal?.meal_list.lunch.menu.slice(0) || []}
/>

<MealInfo
title="저녁"
content={TodayMeal?.meals.dinner.slice(0) || []}
content={TodayMeal?.meal_list.dinner.menu.slice(0) || []}
/>
</MealWrap>
</ContentWrap>
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { theme } from "@/styles/theme";
import { styled } from "styled-components";
import MealInfo from "../meals/meal";
import { TodayMeals } from "@/apis/meal";
import { getFullToday, getToday, getWeekDay } from "@/utils/date";
import { getToday } from "@/utils/date";
import { TodaySelfStudyList } from "@/apis/self-study";
import HelfMenu from "../helpMenu/helpMenu";
import { useEffect, useState } from "react";
Expand Down
1 change: 0 additions & 1 deletion src/components/tab/tab.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { theme } from "@/styles/theme";
import { styled } from "styled-components";
import { useState } from "react";

interface TabProp {
content: string[];
Expand Down
2 changes: 1 addition & 1 deletion src/pages/attendance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Attendance = () => {
setSelectedTab(index);
setDropdownInfo({
grade: selectedGrade,
class_num: selectedGrade,
class_num: selectedClass,
tab: index,
});
};
Expand Down
4 changes: 2 additions & 2 deletions src/pages/bug/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Input from "@/components/input";
import Layout from "@/components/layout/layout";
import ImgModal from "@/components/modal/imgModal";
import { theme } from "@/styles/theme";
import React, { useState, ChangeEvent } from "react";
import { useState, ChangeEvent } from "react";
import { styled } from "styled-components";
import BugReportImg from "@/assets/svg/bugreport.svg";
import { useNavigate } from "react-router-dom";
Expand Down Expand Up @@ -116,7 +116,7 @@ const Bug = () => {
{data.file_name.map((item, index) => (
<ImgWrap key={index}>
<img
src={`${import.meta.env.VITE_PUBLIC_FILE_APP}${item}`}
src={`${process.env.VITE_PUBLIC_FILE_APP}${item}`}
key={index}
/>
<DeleteImgButton onClick={() => handleRemoveImage(index)}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/moveClassRoom/AcceptClass.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Layout from "@/components/layout/layout";
import Tab from "@/components/tab/tab";
import { getToday } from "@/utils/date";
import { useEffect, useState } from "react";
import { useState } from "react";
import ClassMove from "@/components/classMove/classMove";
import { RequestClassRoom } from "@/apis/class-room";
import { getStudentString } from "@/utils/util";
Expand Down
Loading

0 comments on commit 619e938

Please sign in to comment.