Skip to content

Commit

Permalink
style: 💄 ローディング中のデザインを変更
Browse files Browse the repository at this point in the history
  • Loading branch information
hatsu38 committed Apr 27, 2023
1 parent 03c178e commit 39a5e0c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/features/home/components/SectionsBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@ export const SectionsBlock: FC<PropsType> = ({
sections,
className = "",
}) => {
const array = ["🤖", "🦾", "⚒️", "⏳", "🏋️"];
const randomIndex = Math.floor(Math.random() * array.length);
const randomValue = array[randomIndex];
return (
<div
className={`shadow-lg w-full bg-white px-10 py-8 rounded-lg ${className}`}
>
<h3 className="text-center font-bold text-xl">{title}</h3>
{isLoading ? (
<DotLoadingAnimation />
<div className="mt-8 text-center text-sm text-gray-600 space-y-3">
<span className="">AIによる要約中です{randomValue}</span>
<DotLoadingAnimation className="justify-center" />
</div>
) : (
sections.map((item, index) => (
<section className="pt-10" key={`${item.sectionId}-${index}`}>
Expand Down

0 comments on commit 39a5e0c

Please sign in to comment.