Skip to content

Commit

Permalink
setting : 프로젝트 세팅
Browse files Browse the repository at this point in the history
setting : 프로젝트 세팅
  • Loading branch information
phyuna0525 authored Apr 16, 2024
2 parents dd76f7e + 34c09f2 commit 710928b
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 4 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/gitAction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy

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: prod
access_key: ${{ secrets.XQUAER_ACCESS_KEY }}
github_token: ${{ secrets.PICK_WEB_TEACHER }}
buildargs: |
BASE_URL=${{ secrets.BASE_URL }}
7 changes: 7 additions & 0 deletions .xquare/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config:
name: pick-web-teacher
service_type: fe
port: 3000
domain:
prod: pick-teacher.xquare.app
stag: pick-admin-stag.xquare.app
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:21.5.0

WORKDIR /user/src/app

COPY package.json .

RUN yarn

COPY . .

RUN yarn build

ARG BASE_URL
ENV NEXT_PUBLIC_API_KEY $BASE_URL


EXPOSE 3000

CMD ["yarn", "dev"]
9 changes: 9 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
};
8 changes: 4 additions & 4 deletions src/app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use client";
import { useState } from "react";
import Input from "@/components/input";
import Image from "next/image";
import Logo from "@/assets/PiCKLogo.svg";
import Input from "@/components/input";
import Button from "@/components/button";
import { useRouter } from "next/navigation";
import Logo from "@/assets/PiCKLogo.svg";
import { useState } from "react";
import { useLogin } from "@/api/login";
import { useRouter } from "next/navigation";
import { saveToken } from "@/util/auth";

interface ChangeProps {
Expand Down
9 changes: 9 additions & 0 deletions src/app/outList/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const OutList = () => {
return (
<div>
<div></div>
</div>
);
};

export default OutList;
36 changes: 36 additions & 0 deletions src/components/header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"use client";
import { NextPage } from "next";
import Image from "next/image";
import Link from "next/link";
import React, { useEffect, useState } from "react";
import pick from "@/assets/img/Icon/pickname.svg";
import { useRouter } from "next/navigation";

const Header: NextPage = ({}) => {
const [easterUrl, setEasetUrl] = useState<string>("/main");
const [teacherName, setTeacherName] = useState<string | null>(null);
const router = useRouter();

useEffect(() => {
const name = localStorage.getItem("name");
setTeacherName(name);
}, []);

if (teacherName === "영양사") {
router.push(`/WeekendMeals/all`);
} else if (teacherName === "지킴이") {
router.push(`/outList`);
}

return (
<div className="flex px-70 justify-between items-center bg-white py-2">
<Link href={easterUrl}>
<Image src={pick} alt="" width={96} height={52} />
</Link>
<div className="flex font-sans text-nowrap w-36 text-heading6-M text-neutral-50">
{teacherName ? `${teacherName}선생님` : "선생님"}
</div>
</div>
);
};
export default Header;

0 comments on commit 710928b

Please sign in to comment.