-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: Layout and loading set for root page"
This reverts commit ce92893.
- Loading branch information
1 parent
ce92893
commit dfef1be
Showing
5 changed files
with
67 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react"; | ||
import Toolbar from "@/components/filters/toolbar"; | ||
import { container } from "@/components/primitives"; | ||
import { FiltersProvider } from "@/contexts/filters"; | ||
import { decodingSlug } from "@/utils/url"; | ||
|
||
export default function ExploreLayout({ | ||
children, | ||
params, | ||
}: { | ||
children: React.ReactNode; | ||
params: { slug: string }; | ||
}) { | ||
const filters = decodingSlug(params.slug); | ||
return ( | ||
<FiltersProvider initialFilters={filters}> | ||
<div className="flex flex-col"> | ||
<Toolbar /> | ||
<section className={container()}>{children}</section> | ||
</div> | ||
</FiltersProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from "react"; | ||
import ContributionsTable from "@/components/table/table"; | ||
import Toolbar from "@/components/filters/toolbar"; | ||
import { container } from "@/components/primitives"; | ||
import { FiltersProvider } from "@/contexts/filters"; | ||
import { PaginatedCustomDataResponse } from "@/types"; | ||
import { Contribution } from "@/types/contribution"; | ||
import { Filters } from "@/types/filters"; | ||
import { DEFAULT_PAGE_SIZE } from "@/data/fetch"; | ||
|
||
interface IControlledTableProps { | ||
items: PaginatedCustomDataResponse<Contribution>; | ||
filters: Filters; | ||
queryFilter: any; | ||
} | ||
const ControlledTable = ({ | ||
filters, | ||
items, | ||
queryFilter, | ||
}: IControlledTableProps) => { | ||
return ( | ||
<FiltersProvider initialFilters={filters}> | ||
<div className="flex flex-col"> | ||
<Toolbar /> | ||
<section className={container()}> | ||
<ContributionsTable | ||
items={items} | ||
queries={{ | ||
page_size: DEFAULT_PAGE_SIZE, | ||
filter: queryFilter, | ||
}} | ||
/> | ||
</section> | ||
</div> | ||
</FiltersProvider> | ||
); | ||
}; | ||
|
||
export default ControlledTable; |