Skip to content

Commit

Permalink
♻️Refactor - seminarthumnail -> seminarthumbnail 오타 수정 #41
Browse files Browse the repository at this point in the history
  • Loading branch information
bianbbc87 committed May 7, 2024
1 parent 5a06279 commit 9f6bfed
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/app/seminar/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { OPEN_SEMINAR_DATA } from '@/constants/seminar/openSeminarData';
import SeminarDetailPdf from '@/components/seminar/seminarDetail/pdf/SeminarDetailPdf';
import NotFoundPage from '@/app/not-found';
import SeminarDetailReview from '@/components/seminar/seminarDetail/review/SeminarDetailReview';
import { SeminarThumnail } from '@/interfaces/seminar/seminarThumbnail';
import { SeminarThumbnail } from '@/interfaces/seminar/seminarThumbnail';
import { changePathtoNumber } from '@/hooks/seminar/changePathtoNumber';

const SeminarDetailPage = () => {
const pathname = usePathname();
let id = changePathtoNumber(pathname || '');

let data: SeminarThumnail | undefined;
let data: SeminarThumbnail | undefined;

// 일반객체
data = SEMINAR_DATA.find(seminar => `${seminar.id}` === `${id}`);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SeminarThumnail } from '@/interfaces/seminar/seminarThumbnail';
import { SeminarThumbnail } from '@/interfaces/seminar/seminarThumbnail';
import Image from 'next/image';
import React from 'react';

Expand All @@ -13,7 +13,7 @@ import React from 'react';
* Renders the header component for the recruitment section.
* @returns The rendered header component.
*/
const OpenSeminarsDetailBox = ({ data }: { data: SeminarThumnail }) => {
const OpenSeminarsDetailBox = ({ data }: { data: SeminarThumbnail }) => {

return (
<div className="w-full flex flex-row p-4 bg-mono_900 rounded gap-4">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Image from 'next/image';
import { SeminarThumnail } from '@/interfaces/seminar/seminarThumbnail';
import { SeminarThumbnail } from '@/interfaces/seminar/seminarThumbnail';
import TranslateImg from '@/svg/seminar/translate_img.png';
import { motion } from 'framer-motion';
import { seminarCardVariants } from '@/constants/seminar/seminarCardVariants';
Expand All @@ -18,7 +18,7 @@ import SeminarDetailBannerInform from './SeminarDetailBannerInform';
* Renders the header component for the recruitment section.
* @returns The rendered header component.
*/
const SeminarDetailBanner = ({ data }: { data: SeminarThumnail }) => {
const SeminarDetailBanner = ({ data }: { data: SeminarThumbnail }) => {
return (
<div className="w-full mt-8 pb-6 flex desktop:flex-row tablet:flex-col flex-col flex-col gap-8">
{/* 왼쪽 컨텐츠 */}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { SeminarThumnail } from '@/interfaces/seminar/seminarThumbnail';
import { motion } from 'framer-motion';
import { seminarCardVariants } from '@/constants/seminar/seminarCardVariants';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { SeminarThumnail } from '@/interfaces/seminar/seminarThumbnail';
import { SeminarThumbnail } from '@/interfaces/seminar/seminarThumbnail';
import React, { useState } from 'react';
import BannerImg from '@/svg/seminar/seminar_banner.svg';

Expand All @@ -15,7 +15,7 @@ import BannerImg from '@/svg/seminar/seminar_banner.svg';
* Renders the header component for the recruitment section.
* @returns The rendered header component.
*/
const SeminarDetailHeader = ({ data }: { data: SeminarThumnail }) => {
const SeminarDetailHeader = ({ data }: { data: SeminarThumbnail }) => {
const [categoryData, setCategoryData] = useState([data.type, `${data.flag}st`, data.topic]);

return (
Expand Down
6 changes: 3 additions & 3 deletions src/components/seminar/thumbnail/SeminarThumbnail.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SeminarThumnail } from '@/interfaces/seminar/seminarThumbnail';
import { SeminarThumbnail } from '@/interfaces/seminar/seminarThumbnail';
import Image from 'next/image';

/**
Expand All @@ -12,7 +12,7 @@ import Image from 'next/image';
* Renders the header component for the recruitment section.
* @returns The rendered header component.
*/
const SeminarThumbnail = ({ data }: { data: SeminarThumnail }) => {
const SeminarThumbnailBox = ({ data }: { data: SeminarThumbnail }) => {
return (
<div className="w-full aspect-w-16 aspect-h-9">
<Image
Expand All @@ -26,4 +26,4 @@ const SeminarThumbnail = ({ data }: { data: SeminarThumnail }) => {
</div>
);
};
export default SeminarThumbnail;
export default SeminarThumbnailBox;
6 changes: 3 additions & 3 deletions src/components/seminar/thumbnail/SeminarThumbnailList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import React, { useState } from 'react';
import SeminarThumbnail from "./SeminarThumbnail";
import SeminarThumbnailBox from './SeminarThumbnail';
import { SEMINAR_DATA } from '@/constants/seminar/seminarData';
import Link from 'next/link'
import { motion } from 'framer-motion';
Expand Down Expand Up @@ -68,7 +68,7 @@ const SeminarThumbnailList = ({ selectedCategory }: { selectedCategory: string }
<Link
href={`/seminar/${seminar.id}`}
>
<SeminarThumbnail
<SeminarThumbnailBox
key={seminar.id}
data={seminar}
/>
Expand All @@ -94,7 +94,7 @@ const SeminarThumbnailList = ({ selectedCategory }: { selectedCategory: string }
<Link
href={`/seminar/${seminar.id}`}
>
<SeminarThumbnail
<SeminarThumbnailBox
key={seminar.id}
data={seminar}
/>
Expand Down
13 changes: 11 additions & 2 deletions src/constants/seminar/openSeminarData.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import SeminarThumbnailCardImg from '@/svg/seminar/seminar_thumbnail_card.png';
import PresenterProfileImg from '@/svg/seminar/presenter_profile_img.png';
import { OpenSeminar } from '@/interfaces/seminar/openSeminar';
import { SeminarThumnail } from '@/interfaces/seminar/seminarThumbnail';
import { SeminarThumbnail } from '@/interfaces/seminar/seminarThumbnail';
import { SEMINAR_REVIEWS_DATA } from './seminarReviewData';

export const OPEN_DETAIL_SEMINAR_DATA:SeminarThumnail [] = [
export const OPEN_DETAIL_SEMINAR_DATA:SeminarThumbnail [] = [
{
id: 1,
flag: 1,
Expand All @@ -23,6 +24,8 @@ export const OPEN_DETAIL_SEMINAR_DATA:SeminarThumnail [] = [
presenter_role: 'Lead',
seminar_image_url: SeminarThumbnailCardImg.src,
presenter_image_url: PresenterProfileImg.src,
pdf_url: "/pdf/test_pdf.pdf",
reviews: SEMINAR_REVIEWS_DATA[0],
},
{
id: 2,
Expand All @@ -43,6 +46,8 @@ export const OPEN_DETAIL_SEMINAR_DATA:SeminarThumnail [] = [
presenter_role: 'Lead',
seminar_image_url: SeminarThumbnailCardImg.src,
presenter_image_url: PresenterProfileImg.src,
pdf_url: "/pdf/test_pdf.pdf",
reviews: SEMINAR_REVIEWS_DATA[0],
},
{
id: 3,
Expand All @@ -63,6 +68,8 @@ export const OPEN_DETAIL_SEMINAR_DATA:SeminarThumnail [] = [
presenter_role: 'Lead',
seminar_image_url: SeminarThumbnailCardImg.src,
presenter_image_url: PresenterProfileImg.src,
pdf_url: "/pdf/test_pdf.pdf",
reviews: SEMINAR_REVIEWS_DATA[0],
},
{
id: 4,
Expand All @@ -83,6 +90,8 @@ export const OPEN_DETAIL_SEMINAR_DATA:SeminarThumnail [] = [
presenter_role: 'Lead',
seminar_image_url: SeminarThumbnailCardImg.src,
presenter_image_url: PresenterProfileImg.src,
pdf_url: "/pdf/test_pdf.pdf",
reviews: SEMINAR_REVIEWS_DATA[0],
},
]

Expand Down
4 changes: 2 additions & 2 deletions src/constants/seminar/seminarData.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import SeminarThumbnailCardImg from '@/svg/seminar/seminar_thumbnail_card.png';
import PresenterProfileImg from '@/svg/seminar/presenter_profile_img.png';
import { SeminarThumnail } from '@/interfaces/seminar/seminarThumbnail';
import { SeminarThumbnail } from '@/interfaces/seminar/seminarThumbnail';
import { SeminarReview } from '@/interfaces/seminar/seminarReview';
import { SEMINAR_REVIEWS_DATA } from './seminarReviewData';

export const SEMINAR_DATA: SeminarThumnail[] = [
export const SEMINAR_DATA: SeminarThumbnail[] = [
{
id: 1,
flag: 1,
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/seminar/openSeminar.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SeminarThumnail } from "./seminarThumbnail";
import { SeminarThumbnail } from "./seminarThumbnail";

export interface OpenSeminar {
id: number;
Expand All @@ -11,5 +11,5 @@ export interface OpenSeminar {
information: string;
image_url: string;
status: boolean;
seminars: SeminarThumnail[];
seminars: SeminarThumbnail[];
}
2 changes: 1 addition & 1 deletion src/interfaces/seminar/seminarThumbnail.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SeminarReview } from "./seminarReview";

export interface SeminarThumnail {
export interface SeminarThumbnail {
id: number;
flag: number;
type: string;
Expand Down

0 comments on commit 9f6bfed

Please sign in to comment.