Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/innovationacademy-kr/Cabi in…
Browse files Browse the repository at this point in the history
…to common/dev/feat_coin#1604
  • Loading branch information
jnkeniaem committed Jun 11, 2024
2 parents cf7d63a + b089cff commit 82ef4ac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,25 @@ public class Presentation {
private User user;

protected Presentation(Category category, LocalDateTime dateTime,
PresentationTime presentationTime, String subject, String summary, String detail) {
PresentationTime presentationTime, String subject, String summary, String detail) {
this.category = category;
this.dateTime = dateTime;
this.presentationTime = presentationTime;
this.subject = subject;
this.detail = detail;
this.summary = summary;
this.presentationStatus = PresentationStatus.EXPECTED;
this.presentationLocation = PresentationLocation.THIRD;
this.presentationLocation = PresentationLocation.BASEMENT;
}

public static Presentation of(Category category, LocalDateTime dateTime,
PresentationTime presentationTime, String subject, String summary, String detail) {
PresentationTime presentationTime, String subject, String summary, String detail) {

return new Presentation(category, dateTime, presentationTime, subject,
summary, detail);
return new Presentation(category, dateTime, presentationTime, subject, summary, detail);
}

public void adminUpdate(PresentationStatus newStatus, LocalDateTime newDateTime,
PresentationLocation newLocation) {
PresentationLocation newLocation) {
this.presentationStatus = newStatus;
this.dateTime = newDateTime;
this.presentationLocation = newLocation;
Expand Down
2 changes: 1 addition & 1 deletion config
5 changes: 3 additions & 2 deletions frontend/src/Cabinet/components/Common/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface IDropdownOptions {
hasNoOptions?: boolean;
}

export interface IDropdown {
export interface IDropdownProps {
options: IDropdownOptions[];
defaultValue: string;
defaultImageSrc?: string;
Expand All @@ -32,7 +32,8 @@ const Dropdown = ({
closeOtherDropdown,
}: IDropdown) => {
const [currentName, setCurrentName] = useState(defaultValue);
const selectedIdx = options.findIndex((op) => op.name === currentName) ?? 0;
const idx: number = options.findIndex((op) => op.name === currentName);
const selectedIdx: number = idx === -1 ? 0 : idx;
const DefaultOptionIcon =
defaultImageSrc &&
cabinetIconComponentMap[options[selectedIdx].value as CabinetType];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { useRecoilState, useSetRecoilState } from "recoil";
import styled from "styled-components";
import Button from "@/Cabinet/components/Common/Button";
import Dropdown, {
IDropdown,
IDropdownOptions,
IDropdownProps,
} from "@/Cabinet/components/Common/Dropdown";
import ModalPortal from "@/Cabinet/components/Modals/ModalPortal";
import {
Expand Down

0 comments on commit 82ef4ac

Please sign in to comment.