Skip to content

Commit

Permalink
fix lint warnings and cache deps in ci (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasohCHOM authored Nov 26, 2024
1 parent 32d4ca0 commit 64a9be9
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 100 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/website-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,19 @@ jobs:
node-version: 20.x
cache: "npm"

- name: Cache Dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ github.event.pull_request.number }}-
- name: Install Dependencies
run: npm ci

- name: Run lint
- name: Lint
run: npm run lint

- name: Run format check
- name: Format
run: npx prettier --check .
83 changes: 0 additions & 83 deletions src/app/(site)/_components/faq.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/(site)/_components/landing-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import CountDown from "./count-down";
import About from "./about";
import Sponsors from "./sponsors";
import Partners from "./partners";
import FAQ from "./faq";
import FAQ from "@/components/faq";
import Team from "./team";

interface LandingPageProps {
Expand Down
20 changes: 10 additions & 10 deletions src/app/(site)/admin/_components/applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ const Applications: React.FC<ApplicationsProps> = (props) => {
const handleStatusChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
setStatusFilter(event.target.value);
};
// Filter out application when choose from the Filter by: dropdown
const getFilteredApplication = (
applications: ApplicationType[],
statusFilter: string
) => {
return statusFilter === "all"
? applications.filter((app) => !applicationIdx.includes(app.id))
: applications.filter((app) => app.status === statusFilter);
};
const filteredApplications = useMemo(() => {
// Filter out application when choose from the Filter by: dropdown
const getFilteredApplication = (
applications: ApplicationType[],
statusFilter: string
) => {
return statusFilter === "all"
? applications.filter((app) => !applicationIdx.includes(app.id))
: applications.filter((app) => app.status === statusFilter);
};
return getFilteredApplication(applications, statusFilter);
}, [applications, statusFilter, getFilteredApplication]);
}, [applications, statusFilter, applicationIdx]);
const applicationsNumber = filteredApplications.length;
type GroupedData = Record<string, number>;
const classStat: [] = [];
Expand Down
6 changes: 3 additions & 3 deletions src/app/(site)/apply/_components/application-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const ApplicationForm: React.FC<ApplicationProps> = (props) => {
}
}
getGithubLogin();
}, []);
}, [userId]);

const onSubmit = async () => {
try {
Expand Down Expand Up @@ -474,8 +474,8 @@ const ApplicationForm: React.FC<ApplicationProps> = (props) => {
February 24th, 2024.{" "}
</p>
<p className="font-medium text-white">
We will be checking School ID. If you are a minor, you won't be
allowed to attend.
We will be checking School ID. If you are a minor, you won&apos;t
be allowed to attend.
</p>
</div>
<div className="mt-4 flex items-center gap-4">
Expand Down
4 changes: 3 additions & 1 deletion src/app/(site)/feed/_components/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ const Events: React.FC = () => {
</div>
{filteredEvent.map((event: eventsType) => {
return (
<div className="relative rounded-md bg-purple_card p-4 text-white">
<div
key={event.id}
className="relative rounded-md bg-purple_card p-4 text-white">
<div className="flex flex-row items-center justify-between">
<p className="text-lg font-bold">{event.name}</p>
<p
Expand Down
1 change: 1 addition & 0 deletions src/components/faq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const FAQ: React.FC<FAQProps> = (props) => {
<>
<img
src="/assets/cat3.svg"
alt="Cat Icon"
className="absolute top-[5.75rem] left-1 z-10 w-28 md:top-6 md:left-2 md:w-64"
/>
<p className="mb-4 mt-14 font-ohm text-xxl font-medium text-[#B479FF] [text-shadow:_0_0_10px_#FFD8FD] md:text-[5rem]">
Expand Down

0 comments on commit 64a9be9

Please sign in to comment.