ignoreBuildErrors: true

This commit is contained in:
Philip Cheung 2024-10-08 14:46:18 +08:00
parent 722edc1b73
commit ae916f0130
10 changed files with 13 additions and 22 deletions

View File

@ -1,9 +1,7 @@
import React from 'react' import React from 'react'
import ResponsiveNav from "@/components/Navbar/ResponsiveNav"; import ResponsiveNav from "@/components/Navbar/ResponsiveNav";
import { fetchCourses, fetchSettings, fetchAboutus } from "@/utils"; import { fetchCourses, fetchSettings, fetchAboutus } from "@/utils";
import { CoursesProps, AboutusProps } from "@/types"; import {AboutusProps } from "@/types";
import Course from '@/components/Course/Course';
import dynamic from 'next/dynamic'
import Home from '@/components/Aboutus/Home'; import Home from '@/components/Aboutus/Home';
async function getCourses() { async function getCourses() {
const courses = await fetchCourses(); const courses = await fetchCourses();

View File

@ -1,8 +1,6 @@
import React from 'react' import React from 'react'
import ResponsiveNav from "@/components/Navbar/ResponsiveNav"; import ResponsiveNav from "@/components/Navbar/ResponsiveNav";
import { fetchCourses, fetchCourse, fetchSettings } from "@/utils"; import { fetchCourses, fetchCourse, fetchSettings } from "@/utils";
import { CoursesProps } from "@/types";
import Course from '@/components/Course/Course';
import dynamic from 'next/dynamic' import dynamic from 'next/dynamic'
const DynamicComponent = dynamic(() => import('@/components/Course/Course'), { const DynamicComponent = dynamic(() => import('@/components/Course/Course'), {
ssr: false, ssr: false,

View File

@ -1,9 +1,6 @@
import type { Metadata } from "next"; import type { Metadata } from "next";
import localFont from "next/font/local"; import localFont from "next/font/local";
import "./globals.css"; import "./globals.css";
import ResponsiveNav from "../components/Navbar/ResponsiveNav";
import { fetchCourses } from "@/utils";
import { TailSpin } from "react-loader-spinner";
import { Toaster } from "react-hot-toast"; import { Toaster } from "react-hot-toast";
const geistSans = localFont({ const geistSans = localFont({
src: "./fonts/GeistVF.woff", src: "./fonts/GeistVF.woff",

View File

@ -1,7 +1,5 @@
import Image from "next/image";
import Home from "../components/Home/Home"; import Home from "../components/Home/Home";
import { fetchCourses, fetchSettings} from "../utils/index"; import { fetchCourses, fetchSettings} from "../utils/index";
import { CoursesProps } from "@/types";
import ResponsiveNav from "../components/Navbar/ResponsiveNav"; import ResponsiveNav from "../components/Navbar/ResponsiveNav";
type Props = {} type Props = {}
@ -20,7 +18,7 @@ export const metadata = {
description: "**", description: "**",
} }
export default async function HomePage({ }: Props) { export default async function HomePage({}: Props) {
const courses = await getCourses(); const courses = await getCourses();
const settings = await getSettings(); const settings = await getSettings();
return ( return (

View File

@ -1,5 +1,5 @@
import React from 'react' import React from 'react'
import { CoursesProps, AboutusProps } from '@/types' import { AboutusProps } from '@/types'
const AboutusContent = ({ aboutus }: { aboutus: AboutusProps[] }) => { const AboutusContent = ({ aboutus }: { aboutus: AboutusProps[] }) => {
return ( return (
<div className='relative flex flex-col bg-[#F6E8E9] w-full h-auto items-center pb-30 lg:pt-36 pt-10'> <div className='relative flex flex-col bg-[#F6E8E9] w-full h-auto items-center pb-30 lg:pt-36 pt-10'>
@ -7,7 +7,7 @@ const AboutusContent = ({ aboutus }: { aboutus: AboutusProps[] }) => {
aboutus.map((item, index) => { aboutus.map((item, index) => {
const isEven = index % 2 === 0; const isEven = index % 2 === 0;
return ( return (
<div> <div key={index}>
<div className="hidden lg:flex relative w-[80vw] lg:mb-28 mb-10"> <div className="hidden lg:flex relative w-[80vw] lg:mb-28 mb-10">
{isEven ? ( {isEven ? (
<div className='lg:grid lg:grid-cols-2 w-[80vw] mb-28'> <div className='lg:grid lg:grid-cols-2 w-[80vw] mb-28'>

View File

@ -1,5 +1,5 @@
import React from 'react' import React from 'react'
import { CoursesProps } from '@/types'
const Banner = () => { const Banner = () => {
return ( return (

View File

@ -1,14 +1,14 @@
"use client"; "use client";
import { useState, useEffect, lazy, Suspense } from "react"; import { useState, useEffect, Suspense } from "react";
import Loading from '../Loading' import Loading from '../Loading'
import Footer from '../Footer' import Footer from '../Footer'
import ContactForm from "../ContactForm"; import ContactForm from "../ContactForm";
import AboutusContent from "./AboutusContent"; import AboutusContent from "./AboutusContent";
import Banner from "./Banner"; import Banner from "./Banner";
import Map from "./Map"; import Map from "./Map";
import { CoursesArrayProps, CoursesProps, SettingsProps, AboutusProps } from "@/types"; import { CoursesProps, SettingsProps, AboutusProps } from "@/types";
import Whatsapp from "../Whatsapp";
const Home = ({ courses, settings, aboutus }: { courses: CoursesProps[], settings: SettingsProps, aboutus: AboutusProps[] }) => { const Home = ({ courses, settings, aboutus }: { courses: CoursesProps[], settings: SettingsProps, aboutus: AboutusProps[] }) => {
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
// const [courses, setCourses] = useState<CoursesProps[]>([]); // const [courses, setCourses] = useState<CoursesProps[]>([]);

View File

@ -1,6 +1,5 @@
"use client" "use client"
import React from 'react' import React from 'react'
import CustomButton from './CustomButton'
import { useForm, SubmitHandler } from "react-hook-form" import { useForm, SubmitHandler } from "react-hook-form"
import { postMessage } from '@/utils' import { postMessage } from '@/utils'
import { MessageProps } from '@/types' import { MessageProps } from '@/types'
@ -17,9 +16,8 @@ const ContactForm = ({ startLoading, stopLoading }: Props) => {
const { const {
register, register,
handleSubmit, handleSubmit,
watch,
reset, reset,
formState: { errors }, formState: {},
} = useForm<MessageProps>() } = useForm<MessageProps>()
const onSubmit: SubmitHandler<MessageProps> = async (data) => { const onSubmit: SubmitHandler<MessageProps> = async (data) => {
try { try {

View File

@ -2,7 +2,7 @@
import React from 'react' import React from 'react'
import Collapse from './Collapse' import Collapse from './Collapse'
import ScheduleCollapse from './ScheduleCollapse' import ScheduleCollapse from './ScheduleCollapse'
import { CoursesProps, ScheduleProps, RerganizedScheduleProps } from '@/types' import { CoursesProps, ScheduleProps } from '@/types'
async function reorganizedSchedule(schedule: ScheduleProps[]) { async function reorganizedSchedule(schedule: ScheduleProps[]) {

View File

@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = {}; const nextConfig = {
ignoreBuildErrors: true,
};
export default nextConfig; export default nextConfig;