Skip to content

Commit

Permalink
Merge pull request #162 from isd-sgcu/icy-fe/fix-activities
Browse files Browse the repository at this point in the history
Activity Sidebar & Fix Typo
  • Loading branch information
TeeGoood authored Jul 21, 2024
2 parents 1d6c26b + 74e728e commit 324c868
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 32 deletions.
5 changes: 3 additions & 2 deletions src/app/rpkm/activities/details/baan/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ import ActivityButton from '@/components/rpkm/Activities/ActivityButton';

import BackButton from '@public/rpkm/activities/back.svg';
import BaanImage from '@public/rpkm/activities/baanbackground.png';
import { getCurrentTime } from '@/utils/time';

const Page = () => {
const [selectBannAble, setSelectBannAble] = useState<boolean>(false);

useEffect(() => {
const interval = setInterval(() => {
const currentTime = new Date();
const interval = setInterval(async () => {
const currentTime = (await getCurrentTime()).currentTime;
const eventTime = new Date('2024-07-24T23:59:59+07:00');
if (currentTime <= eventTime) {
setSelectBannAble(true);
Expand Down
2 changes: 1 addition & 1 deletion src/app/rpkm/activities/details/community/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const Page = () => {
</p>
<h3 className="font-semibold pt-2"> การแลกรับของที่ระลึก</h3>
<p>
&emsp;การแลกกแต้มเพื่อรับของที่ระลึก เมื่อเเต้มครบ 10 เเต้ม
&emsp;การแลกแต้มเพื่อรับของที่ระลึก เมื่อเเต้มครบ 10 เเต้ม
สามารถกดเเลกเป็นคูปองไว้ได้เลย เมื่อจะเเลกคูปอง
ก็ให้ไปที่บูธกิจกรรมชุมชนในงานรับเพื่อนก้าวใหม่ (3-4 สิงหาคม)
เเละศาลเจ้าเเม่ทับทิมสะพานเหลือง
Expand Down
8 changes: 4 additions & 4 deletions src/app/rpkm/activities/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Divider from '@/components/rpkm/Activities/Divider';

// import ActivitiesBanner from '@public/rpkm/activities/activities.png';
// import WalkRallyBanner from '@public/rpkm/activities/walkrally.png';
// import CommunityBanner from '@public/rpkm/activities/community.png';
import CommunityBanner from '@public/rpkm/activities/community.png';
import BaanBanner from '@public/rpkm/activities/baan.png';

// import activities from '@/data/activities';
Expand Down Expand Up @@ -81,8 +81,8 @@ const page = () => {
>
ดูทั้งหมด
</Link> */}
{/* <Divider /> */}
{/* <Banner image={CommunityBanner} />
<Divider />
<Banner image={CommunityBanner} />
<div className="justify-center flex">
<Card
name="กิจกรรมชุมชน"
Expand All @@ -94,7 +94,7 @@ const page = () => {
className="w-[80vw]"
contentClassName="line-clamp-3"
/>
</div> */}
</div>
{/* <Link
className="text-sm font-semibold flex justify-end underline mr-4 mt-2"
href="/rpkm/activities/community"
Expand Down
2 changes: 1 addition & 1 deletion src/app/rpkm/activities/map/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const page = () => {
<section className="min-h-screen bg-[url('/rpkm/activities/small-background.png')] bg-cover bg-[#EAE3C3] text-black">
<Navbar />
<div className="flex justify-center -mb-20">
<div className="flex flex-col items-center gap-y-1 pt-16">
<div className="flex flex-col items-center gap-y-1 pt-4">
<h1
className="font-sopha text-[20vh] text-rpkm-pink tracking-wide"
style={{
Expand Down
55 changes: 31 additions & 24 deletions src/components/rpkm/Sidebar/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
// import { Accordion, AccordionItem } from '@nextui-org/accordion';
import { Accordion, AccordionItem } from '@nextui-org/accordion';
import Link from 'next/link';
import { Icon } from '@iconify/react/dist/iconify.js';
import { useAuth } from '@/context/AuthContext';
Expand All @@ -21,7 +21,7 @@ function Menu() {
ลงทะเบียน Freshy Night
</Link> */}
<div className="w-full h-px bg-black"></div>
<Link
{/* <Link
href={'/rpkm/activities/home'}
className="mt-2"
>
Expand All @@ -32,41 +32,48 @@ function Menu() {
className=""
>
เเผนที่
</Link>
</Link> */}
<div className="w-full -px-2">
{/* <Accordion
<Accordion
selectionMode="multiple"
className="text-start self-start px-0"
isCompact={true}
>
<AccordionItem
key="1"
aria-label="Accordion 1"
title={<div className="py-0">กิจกรรม</div>}
title={<div className="">กิจกรรม</div>}
>
<div className="flex flex-col w-full justify-items-start text-sm px-xs">
<div className="flex flex-col w-full justify-items-start text-sm px-2 -mt-2">
<Link
href="/rpkm/activities/"
className="text-left"
href={'/rpkm/activities/home'}
className="py-0"
>
กิจกรรมในงาน
หน้าหลัก
</Link>
<Link
href="/rpkm/baan/home"
className="text-left"
<div
// href="/rpkm/activities/"
className="text-left text-gray-400 cursor-not-allowed"
>
ข้อมูลแต่ละบ้าน
</Link>
กิจกรรมในงาน
</div>
<div
// href="/rpkm/activities/"
className="text-left text-gray-400 cursor-not-allowed"
>
กิจกรรม Walk Rally
</div>
<Link
href="/rpkm/activities/"
href="/rpkm/activities/details/community"
className="text-left"
>
กิจกรรมชุมชน
</Link>
<Link
href="/rpkm/activities/"
href="/rpkm/baan/baan-select"
className="text-left"
>
กิจกรรม Walk Rally
ข้อมูลแต่ละบ้าน
</Link>
</div>
</AccordionItem>
Expand All @@ -75,22 +82,22 @@ function Menu() {
aria-label="Accordion 2"
title={<div>แผนที่</div>}
>
<div className="flex flex-col w-full justify-items-start text-sm px-xs">
<div className="flex flex-col w-full justify-items-start text-sm px-2 -mt-2">
<Link
href="/"
href="/rpkm/activities/map"
className="text-left"
>
ข้อมูลที่จัดแต่ละกิจกรรม
</Link>
<Link
href="/rpkm/activities/"
className="text-left"
<div
// href="/rpkm/activities/"
className="text-left text-gray-400 cursor-not-allowed"
>
กิจกรรมชุมชน
</Link>
</div>
</div>
</AccordionItem>
</Accordion> */}
</Accordion>
</div>
<div className="mt-auto">
<div className="w-full h-px bg-black"></div>
Expand Down

0 comments on commit 324c868

Please sign in to comment.