Skip to content
Open
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
77 changes: 42 additions & 35 deletions packages/tapie/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
import {withSentryConfig} from '@sentry/nextjs';
import { withSentryConfig } from '@sentry/nextjs';
import { withTAPIEWebConfig } from '@tapie-kr/web-shared/configs/nextjs.mjs';

export default withSentryConfig(withTAPIEWebConfig(), {
// For all available options, see:
// https://www.npmjs.com/package/@sentry/webpack-plugin#options

org: "tapie-ne",
project: "tapie-web",

// Only print logs for uploading source maps in CI
silent: !process.env.CI,

// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Automatically annotate React components to show their full name in breadcrumbs and session replay
reactComponentAnnotation: {
enabled: true,
},

// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
tunnelRoute: "/monitoring",

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
});
/*
* For all available options, see:
* https://www.npmjs.com/package/@sentry/webpack-plugin#options
*/

org: 'tapie-ne',
project: 'tapie-web',

// Only print logs for uploading source maps in CI
silent: !process.env.CI,

/*
* For all available options, see:
* https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
*/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Automatically annotate React components to show their full name in breadcrumbs and session replay
reactComponentAnnotation: { enabled: true },

/*
* Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
* This can increase your server load as well as your hosting bill.
* Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
* side errors will fail.
*/
tunnelRoute: '/monitoring',

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

/*
* Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
* See the following for more information:
* https://docs.sentry.io/product/crons/
* https://vercel.com/docs/cron-jobs
*/
automaticVercelMonitors: true,
});
2 changes: 1 addition & 1 deletion packages/tapie/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@js-temporal/polyfill": "^0.4.4",
"@sentry/nextjs": "^9",
"@svgr/webpack": "^8.1.0",
"@tapie-kr/api-client": "0.1.16",
"@tapie-kr/api-client": "0.1.17",
"@tapie-kr/api-database": "^0.0.3",
"@tapie-kr/inspire-react": "^0.2.15",
"@tapie-kr/web-shared": "workspace:*",
Expand Down
9 changes: 0 additions & 9 deletions packages/tapie/src/app/api/sentry-example-api/route.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/tapie/src/app/apply/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function ApplyPage() {

// 기본 Form 정보를 가져온 후 Application 정보를 가져옴
useEffect(() => {
if (currentForm?.data === null) notFound();
if (currentForm?.data === null || currentForm?.data.available === false) notFound();

if (currentForm?.data.id) {
getMyApplication({ param: { formId: currentForm?.data.id } });
Expand Down
2 changes: 1 addition & 1 deletion packages/tapie/src/app/portfolios/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function PortfoliosDetailPage() {
client.get(`/projects/${id}`).then(res => {
setData(res.data.data as PortfolioDetail);
})
.catch(err => {
.catch(() => {
// if (err.response.status === 404) {
setError(true);

Expand Down
1 change: 0 additions & 1 deletion packages/tapie/src/app/portfolios/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Hero from '@/sections/portfolios/index/Hero';
import Members from '@/sections/portfolios/index/Members';
import Projects from '@/sections/portfolios/index/Projects';
// import RecentAwards from '@/sections/portfolios/index/RecentAwards';
import RecentProjects from '@/sections/portfolios/index/RecentProjects';

export default function PortfolioPage() {
Expand Down
30 changes: 21 additions & 9 deletions packages/tapie/src/components/home/ApplyBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,39 @@ import ApplyBannerNow from './categories/Now';

export default function ApplyBanner() {
const { fetch: getForm, data } = useForm();
const [currentTime, setCurrentTime] = useState(new Date);
const [isEarly, setIsEarly] = useState(true);

useEffect(() => {
getForm();
}, []);

useEffect(() => {
if (data?.data) {
const startAt = toTemporalDateTime(data.data.startsAt);

// Update current time
const timer = setInterval(() => {
setCurrentTime(new Date);
}, 1000);
// 초기 상태 설정
const checkTime = () => {
const now = Temporal.Now.plainDateTimeISO();

return () => clearInterval(timer);
}, []);
setIsEarly(Temporal.PlainDateTime.compare(now, startAt) < 0);
};

// 처음 한 번 체크
checkTime();

// 1초마다 체크
const intervalId = setInterval(checkTime, 1000);

return () => clearInterval(intervalId);
}
}, [data]);

if (data?.data === null || !data) {
return null;
}

const startAt = toTemporalDateTime(data.data.startsAt);
const endAt = toTemporalDateTime(data.data.endsAt);
const now = toTemporalDateTime(currentTime.toISOString());
const isEarly = Temporal.PlainDateTime.compare(now, startAt) < 0;

return (
<>
Expand Down
4 changes: 2 additions & 2 deletions packages/tapie/src/sections/apply/Form/shared.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export type ApplyFormStructure = {
}

};
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

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