Skip to content

Commit

Permalink
[#153] PR 올릴 경우, 자동으로 build 실행 (#154)
Browse files Browse the repository at this point in the history
* feat: PR 올릴 때, Github Action에서 build 트리거

* fix: 빌드가 안되는 부분 업데이트

* feat: 자동 PR 등록

* fix: 노드 버전 업데이트

* fix: 절대 경로로 변경

* fix: add param
  • Loading branch information
halfmoon-mind authored Dec 18, 2023
1 parent 40fc3a9 commit be7f8dd
Show file tree
Hide file tree
Showing 54 changed files with 229 additions and 171 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- @halfmoon-mind @ChoiSangwon @JooHui-void @SujinKim1127 @jwo0o0 @chan0310
23 changes: 23 additions & 0 deletions .github/workflows/pull_request_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build on PR

on:
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16'

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build
3 changes: 1 addition & 2 deletions src/components/Calendar/AlarmSetting/AlarmSetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import video from '@icons/icon/LectureAssignment/Video.svg';
import comment from '@icons/icon/LectureAssignment/Comment.svg';
import assignment from '@icons/icon/LectureAssignment/Assignment.svg';
import Image from 'next/image';
import SubjectTitle from '../SubjectTitle';
import { SubjectDTO } from '@/types/Subject';

import { TaskProps } from '@/types/Task';
import SubjectTitle from '@/components/Calendar/SubjectTitle/index';

interface AlarmProps {
subjects: SubjectDTO[];
Expand Down
2 changes: 1 addition & 1 deletion src/components/Calendar/EditEventModal/EditEventModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { ko } from 'date-fns/locale';
import calendar from '@icons/icon/Calendars/calendar.svg';
import Image from 'next/image';
import {
Course,
getCourseAPI,
postCourseAssignmentAPI,
postCourseVideoAPI,
} from '@/apis/courseAPIS';
import { Course } from '@/types/course';

interface EditEventModalProps {
event?: EventProps;
Expand Down
File renamed without changes.
File renamed without changes.
47 changes: 28 additions & 19 deletions src/components/Home/NoticeFunSystem/NoticeFunSystem.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
import React from 'react';
import { Story } from '@storybook/react';
import NoticeFunSystem, {NoticeFunSystemProps} from './NoticeFunSystem';
import NoticeFunSystem, { NoticeFunSystemProps } from './NoticeFunSystem';

export default {
title: 'Home/NoticeFunSystem',
component: NoticeFunSystem,
};

const summaries = [
{
textContent: '2023-1학기(여름계절제수업 포함) 성적처리~~~~~~~~~~~~~~~~~~~~~~~',
date: '5/11',
},
{
textContent: '두 번째 공지 내용',
date: '5/12',
},
{
textContent: '세 번째 공지 내용',
date: '5/13',
},
];

const Template: Story<NoticeFunSystemProps> = (args) => <NoticeFunSystem {...args} />;
const Template: Story<NoticeFunSystemProps> = (args) => (
<NoticeFunSystem {...args} />
);
export const Default = Template.bind({});
Default.args = {
title: '공지사항 혹은 펀시스템',
summaries: summaries,
};
summaries: [
{
id: 1,
title: '2023-1학기(여름계절제수업 포함) 성적처리~~~~~~~~~~~~~~~~~~~~~~~',
category: 'Notice',
createdAt: '5/11',
views: 10,
},
{
id: 2,
title: '두 번째 공지 내용',
category: 'Notice',
createdAt: '5/12',
views: 5,
},
{
id: 3,
title: '세 번째 공지 내용',
category: 'Notice',
createdAt: '5/13',
views: 8,
},
],
};
Original file line number Diff line number Diff line change
@@ -1,23 +1,45 @@
import React from 'react';
import { COLORS } from '@/styles/constants/colors';
import * as styles from "@/components/community/community_writing/ImageInputBox/IconBox/IconBox.styles"
import * as styles from '@/components/community/community_writing/ImageInputBox/IconBox/IconBox.styles';
import Image from 'next/image';
interface FormData {
iconSize?:number;
width?:number;
height?:number;
backCol?:string;
margin?:number;
IconCol?:string;
iconSize?: number;
width?: number;
height?: number;
backgroundColor?: string;
margin?: number;
IconColor?: string;
}

const IconBox = ({iconSize,width,height,backCol,margin,IconCol }:FormData) => {
const IconBox = ({
iconSize,
width,
height,
backgroundColor,
margin,
IconColor,
}: FormData) => {
return (
<>
<label htmlFor="imageInput">
<styles.IconBox style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}
width={width} height={height} backgroundColor={backCol} margin={margin}>
<img src="/camera.svg" style={{color:`${IconCol?IconCol: COLORS.grayscale.Black}`,
width:`${iconSize? `${iconSize}px`: "40px"}`}}/>
<styles.IconBox
style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
width={width}
height={height}
backgroundColor={backgroundColor}
margin={margin}
>
<Image
src="/camera.svg"
width={iconSize ? iconSize : 40}
height={iconSize ? iconSize : 40}
color={IconColor ? IconColor : COLORS.grayscale.Black}
alt="camera"
/>
</styles.IconBox>
</label>
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
import React from 'react';
import { FiCamera } from 'react-icons/fi'; // react-icons에서 FiCamera 아이콘 불러오기
import ImageBox from './ImageBox/ImageBox';
import IconBox from './IconBox/IconBox';
import TitleBox from './TitleBox/TitleBox';

interface FormData {
previewImage: string[]; // 이미지 미리보기를 위한 string 배열
handleImageChange:(event: React.ChangeEvent<HTMLInputElement>) => void; // onChange 타입 변경
handleImageChange: (event: React.ChangeEvent<HTMLInputElement>) => void; // onChange 타입 변경
}

const ImageInputBox = ({previewImage,handleImageChange }:FormData) => {
const ImageInputBox = ({ previewImage, handleImageChange }: FormData) => {
return (
<>
<TitleBox/>
<div style={{display:"flex"}}>
{previewImage.length === 0 ? null : (
<>
{previewImage.map((image, index) => (
<ImageBox index={index} image={image}/>
))}
</>
)}
<IconBox/>
<input
type="file"
id="imageInput"
name="previewImage"
accept="image/*"
multiple
onChange={handleImageChange}
hidden
/>
</div>
<TitleBox />
<div style={{ display: 'flex' }}>
{previewImage.length === 0 ? null : (
<>
{previewImage.map((image, index) => (
<ImageBox key={index} index={index} image={image} />
))}
</>
)}
<IconBox />
<input
type="file"
id="imageInput"
name="previewImage"
accept="image/*"
multiple
onChange={handleImageChange}
hidden
/>
</div>
</>
);
};
Expand Down
Loading

0 comments on commit be7f8dd

Please sign in to comment.