Skip to content

Commit

Permalink
Merge pull request #132 from keemsebin/feature#129
Browse files Browse the repository at this point in the history
feat : admin 동아리 박람회 이벤트 제거
  • Loading branch information
keemsebin committed Mar 18, 2024
2 parents 8654e94 + 2511446 commit d8e6242
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 187 deletions.
18 changes: 5 additions & 13 deletions src/components/layout/AdminHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ const navItems = [
href: '/',
content: '홈',
},
{
id: 2,
href: '/event',
content: '동아리박람회',
},
];

export default function AdminHeader() {
Expand Down Expand Up @@ -45,17 +40,14 @@ export default function AdminHeader() {
</Link>
{!isLoginPage && (
<nav className="-mr-4 md:block">
<ul className="flex items-center">
<ul className="flex">
{navItems.map((item) => (
<li
key={item.id}
className={` mx-1 md:visible ${item.id === 1 && 'invisible'}`}
>
<li key={item.id} className="invisible mx-1 md:visible">
<Link
href={item.href}
className={`font-semibold transition-colors hover:text-pink-300 md:inline-block md:p-3 ${
className={`inline-block p-3 font-semibold transition-colors hover:text-blue-500 ${
isNavActive(curPath, item.href)
? 'text-pink-400'
? 'text-blue-500'
: 'text-gray-500'
}`}
>
Expand All @@ -65,7 +57,7 @@ export default function AdminHeader() {
))}
<li className="mx-1">
<button
className="rounded-xl p-3 font-semibold text-gray-500 hover:text-pink-300 "
className="rounded-xl p-3 font-semibold text-gray-500 hover:text-blue-500 "
onClick={() => {
removeToken();
resetAuth();
Expand Down
4 changes: 1 addition & 3 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function middleware(req: NextRequest) {
const isClub = cookie?.includes(ROLE_TYPE.ROLE_CLUB);

const allowedPaths = {
[ROLE_TYPE.ROLE_ADMIN]: ['/club', '/notice/new', '/banner', '/event'],
[ROLE_TYPE.ROLE_ADMIN]: ['/club', '/notice/new', '/banner'],
[ROLE_TYPE.ROLE_CLUB]: ['/my-club'],
};

Expand Down Expand Up @@ -50,8 +50,6 @@ export const config = {
'/club/:path*',
'/report',
'/banner',
'/event',
'/event/:path*',
'/admin/:path*',
'/report/:path*',
],
Expand Down
96 changes: 0 additions & 96 deletions src/pages/admin/event/[id]/index.tsx

This file was deleted.

56 changes: 0 additions & 56 deletions src/pages/admin/event/index.tsx

This file was deleted.

21 changes: 2 additions & 19 deletions src/pages/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default function Index() {
{role === ROLE_TYPE.ROLE_CLUB && <Dropdown />}
</div>
<div className="relative mt-7">
{/* <Link
<Link
href="/banner"
className={`absolute right-0 top-2 z-10 inline-block w-12 p-2 opacity-40 transition-opacity hover:opacity-70 ${
role === ROLE_TYPE.ROLE_CLUB && 'invisible'
Expand All @@ -74,25 +74,8 @@ export default function Index() {
className="w-5"
/>
</Link>
<Slider /> */}
<Link href={'/event'}>
<Image
src={PcBanner}
width={1440}
height={300}
className="hidden md:block md:w-full"
alt="banner"
/>
<Image
src={MobileBanner}
width={1440}
height={300}
className="mb-4 h-56 w-full md:hidden md:h-48"
alt="banner"
/>
</Link>
<Slider />
</div>

<div className="mt-2 grid w-full grid-cols-1 gap-3 sm:grid-cols-3 md:mt-6 md:gap-5">
<Link
href={ROLE_TEXT[role].club.route}
Expand Down

0 comments on commit d8e6242

Please sign in to comment.