Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthonyp0329 committed Sep 20, 2024
1 parent 6801265 commit 49f72e9
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions admin-portal-frontend/src/app/category/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Category, deletePage } from "../api/Categories";
import PageContainer from "../components/PageContainer";

Check warning on line 7 in admin-portal-frontend/src/app/category/page.tsx

View workflow job for this annotation

GitHub Actions / Admin portal frontend lint and style check

Using exported name 'PageContainer' as identifier for default export
import Toast from "../components/Toast";

export default function CategoriesPage() {
function CategoryInfo() {
const searchParams = useSearchParams();
const categoryString = searchParams.get("category");
const [category, setCategory] = useState(
Expand Down Expand Up @@ -42,30 +42,32 @@ export default function CategoriesPage() {
};

return (
<Suspense fallback={<div>Loading...</div>}>
<div className="flex flex-col items-center justify-center min-h-screen w-screen overflow-auto p-20 gap-8 bg-[#E5EFF5]">
<div className="flex flex-row justify-between w-5/6">
<h1 className="text-start text-2xl font-bold">{category ? category.title : "ooga"}</h1>
</div>
<div className="flex flex-col items-center justify-center min-h-screen w-screen overflow-auto p-20 gap-8 bg-[#E5EFF5]">
<div className="flex flex-row justify-between w-5/6">
<h1 className="text-start text-2xl font-bold">{category ? category.title : "ooga"}</h1>
</div>

<div className="flex flex-col h-max w-5/6 p-10 rounded-md bg-white">
<div className="flex flex-row items-center justify-between mb-10">
<h2 className="text-2xl">All Pages</h2>
<div className="flex flex-row flex-wrap justify-end gap-2">
<button className="px-4 py-2 rounded-md text-white bg-[#00629B]">Edit Order</button>
<button className="px-4 py-2 rounded-md text-white bg-[#00629B]">+ Add Page</button>
</div>
<div className="flex flex-col h-max w-5/6 p-10 rounded-md bg-white">
<div className="flex flex-row items-center justify-between mb-10">
<h2 className="text-2xl">All Pages</h2>
<div className="flex flex-row flex-wrap justify-end gap-2">
<button className="px-4 py-2 rounded-md text-white bg-[#00629B]">Edit Order</button>
<button className="px-4 py-2 rounded-md text-white bg-[#00629B]">+ Add Page</button>
</div>
<PageContainer items={[category]} onDeletePage={onDeletePage}></PageContainer>
{showToast && (
<Toast
backgroundColor={"#000000"}
message={"Page deleted"}
onClose={handleCloseToast}
/>
)}
</div>
<PageContainer items={[category]} onDeletePage={onDeletePage}></PageContainer>
{showToast && (
<Toast backgroundColor={"#000000"} message={"Page deleted"} onClose={handleCloseToast} />
)}
</div>
</div>
);
}

export default function CategoriesPage() {
return (
<Suspense>
<CategoryInfo />
</Suspense>
);
}

0 comments on commit 49f72e9

Please sign in to comment.