Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#153] PR 올릴 경우, 자동으로 build 실행 #154

Merged
merged 6 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading