Skip to content

Commit

Permalink
Merge pull request #266 from WilliamDavidson-02/fix-loader-ui-issue
Browse files Browse the repository at this point in the history
fixed ui loader on doc page
  • Loading branch information
devvsakib authored Sep 3, 2024
2 parents 31a0c88 + 8ea2388 commit 01094ba
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/pages/Doc/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,29 @@ const DocList = () => {
};

fetchDocs();
}, []);
}, []);



if (loading) return <div className="flex justify-center items-center h-screen"><Spin size="large" /></div>;
if (error) return <Alert message="Error" description={error} type="error" />;

return (
<Layout>
<div className="container mx-auto p-4 min-h-screen">
<MainTitle highlight={'Documentation'} />
<ul className='grid gap-5 mx-auto md:max-w-2xl'>
{loading ? (
<div className='grid place-content-center mx-auto md:max-w-2xl aspect-video'>
<Spin size="large" />
</div>
) : (<ul className='grid gap-5 mx-auto md:max-w-2xl'>
{
docs.map(item =>
<Link to={item.title} className='capitalize group flex items-center justify-between bg-white/10 p-5 rounded-md'>{item.title.replace(/_/g, ' ')}
<Link key={item.title} to={item.title} className='capitalize group flex items-center justify-between bg-white/10 p-5 rounded-md'>{item.title.replace(/_/g, ' ')}
<FaArrowRight className="dark:text-white opacity-0 group-hover:opacity-100 -translate-x-10 group-hover:translate-x-0 transition duration-300" />
</Link>
)
}
</ul>
</ul>)}
</div>
</Layout>
);
Expand Down

0 comments on commit 01094ba

Please sign in to comment.