add loading all page & change bugs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
'use client';
|
||||
import { useState } from 'react';
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import About from './components/about';
|
||||
import Contact from './components/contact';
|
||||
@@ -11,14 +12,21 @@ const listTab = ['درباره کلینیک', 'اطلاعات تماس', 'پزش
|
||||
function ClinicPage({ data, doctors }) {
|
||||
|
||||
const [value, setValue] = useState(0);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const handleChange = (event, newValue) => setValue(newValue);
|
||||
|
||||
const Components = [
|
||||
<About data={data} />,
|
||||
<Contact data={data} />,
|
||||
<Doctors doctors={doctors} />
|
||||
<About data={data} loading={loading} />,
|
||||
<Contact data={data} loading={loading} />,
|
||||
<Doctors doctors={doctors} loading={loading} />
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
}, 2000);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="pt-[40px] sm:pt-[70px] md:pt-[100px] lg:pt-[136px] mt-[40px] padding-responsive">
|
||||
<Tabs
|
||||
|
||||
Reference in New Issue
Block a user