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

feat :: 채널톡 추가 및 모집의뢰서 스타일 수정 #84

Merged
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
11 changes: 11 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@channel.io/channel-web-sdk-loader": "^2.0.0",
"@next/font": "^13.5.2",
"@sentry/nextjs": "^8.33.1",
"@sentry/utils": "^8.33.1",
Expand Down
9 changes: 9 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import localFont from "@next/font/local";
import { usePathname } from "next/navigation";
import { useEffect } from "react";
import "./globals.css";
import * as ChannelService from "@channel.io/channel-web-sdk-loader";

const pretendard = localFont({
src: [
Expand Down Expand Up @@ -45,6 +46,14 @@ export default function RootLayout({
}
}, [pathname]);

ChannelService.loadScript();

const CHATKEY = process.env.NEXT_PUBLIC_CHAT_KEY || "";

ChannelService.boot({
pluginKey: CHATKEY,
});

return (
<html>
<SEOConfig />
Expand Down
20 changes: 11 additions & 9 deletions src/components/recruitments/RecruitmentsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ export default function RecruitmentsCard({ maxLength = 12 }: PropsType) {
return (
<div className="w-full mt-5 grid grid-cols-3 md:grid-cols-4 gap-[1.5vw]">
{isLoading && <RecruitmentSkelton />}
{recruitmentsList?.recruitments.length === 0 ? (
<p className="col-span-4 text-center">⚠ 아직 모집의뢰서가 없습니다.</p>
) :
recruitmentsList?.recruitments.filter((_, idx) => idx < maxLength).map((item) => {
return <RecruitmentsItem key={item.id} {...item} />;
})}
{recruitmentsList?.recruitments.length === 0 ? (
<p className="col-span-4 text-center">⚠ 아직 모집의뢰서가 없습니다.</p>
) : (
recruitmentsList?.recruitments
.filter((_, idx) => idx < maxLength)
.map((item) => {
return <RecruitmentsItem key={item.id} {...item} />;
})
)}
</div>
);
}


function RecruitmentsItem({
company_profile_url,
company_name,
Expand All @@ -51,7 +53,7 @@ function RecruitmentsItem({

return (
<HoverPrefetchLink href={`/recruitments/detail?id=${id}`}>
<div className="flex flex-col w-full overflow-hidden transition duration-200 cursor-pointer shadow-elevaiton rounded-xl hover:transition hover:scale-105">
<div className="flex flex-col w-full overflow-hidden transition duration-200 cursor-pointer shadow-elevaiton rounded-xl hover:transition hover:scale-105 h-full">
<div className="w-full h-0 pb-[70%] relative">
<Image
className="absolute object-contain"
Expand Down Expand Up @@ -88,4 +90,4 @@ function RecruitmentsItem({
</div>
</HoverPrefetchLink>
);
}
}
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ __metadata:
languageName: node
linkType: hard

"@channel.io/channel-web-sdk-loader@npm:^2.0.0":
version: 2.0.0
resolution: "@channel.io/channel-web-sdk-loader@npm:2.0.0"
checksum: 11902a0695e718b2ff8f1df92684bd2c5bea06b5e4d83a1f907fe6eef16d1ca6e231bd4bceced2cd4e839c05407d9a8b96034cb902d17998e1e9e2bd799ea8ff
languageName: node
linkType: hard

"@emotion/is-prop-valid@npm:1.2.2":
version: 1.2.2
resolution: "@emotion/is-prop-valid@npm:1.2.2"
Expand Down Expand Up @@ -5055,6 +5062,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "my-app@workspace:."
dependencies:
"@channel.io/channel-web-sdk-loader": ^2.0.0
"@next/font": ^13.5.2
"@sentry/nextjs": ^8.33.1
"@sentry/utils": ^8.33.1
Expand Down
Loading