= (props) => {
});
};
- console.log("showAll", router.query.showAll);
-
return (
{/* TODO RequestDigital {this.state.requestedEdition && this.getRequestDigital(work)} */}
@@ -109,7 +107,7 @@ const WorkDetail: React.FC<{ workResult: WorkResult }> = (props) => {
<>Show only items currently available online>
),
}}
- checked={router.query.showAll === "false"}
+ checked={router.query.showAll !== "true"}
onChange={(e) => toggleShowAll(e)}
/>
diff --git a/src/lib/api/SearchApi.ts b/src/lib/api/SearchApi.ts
index d955bd73..b6bafad1 100644
--- a/src/lib/api/SearchApi.ts
+++ b/src/lib/api/SearchApi.ts
@@ -23,7 +23,7 @@ const defaultWorkQuery: WorkQuery = {
const defaultEditionQuery = {
editionIdentifier: "",
- showAll: "false",
+ showAll: "true",
};
//TODO: Lower Priority: combine SearchQuery and ApiSearchQuery
@@ -82,9 +82,11 @@ export const workFetcher = async (query: WorkQuery) => {
export const editionFetcher = async (query: EditionQuery) => {
const editionApiQuery = {
editionIdentifier: query.editionIdentifier,
- showAll: query.showAll ? query.showAll : defaultEditionQuery.showAll,
+ showAll:
+ typeof query.showAll !== "undefined"
+ ? query.showAll
+ : defaultEditionQuery.showAll,
};
-
const res = await fetch(editionUrl, {
method: "POST",
headers: {
diff --git a/src/pages/edition/[editionId]/index.tsx b/src/pages/edition/[editionId]/index.tsx
index 23cb4f14..48c580f8 100644
--- a/src/pages/edition/[editionId]/index.tsx
+++ b/src/pages/edition/[editionId]/index.tsx
@@ -9,6 +9,7 @@ export async function getServerSideProps(context: any) {
//TODO: Default query
const editionQuery: EditionQuery = {
editionIdentifier: context.query.editionId,
+ showAll: context.query.showAll,
};
const editionResult: EditionResult = await editionFetcher(editionQuery);
diff --git a/styles/components/Search.scss b/styles/components/Search.scss
index 173bd9a0..1f4b0c26 100644
--- a/styles/components/Search.scss
+++ b/styles/components/Search.scss
@@ -15,7 +15,7 @@
.search-filter {
@include space-stack-xs;
border-top: 2px solid var(--section-research-primary);
- background-color: var(--ui-gray-light);
+ background-color: var(--ui-gray-xlight);
h2 {
@include space-inset-xs;
@@ -28,5 +28,11 @@
}
.filter-button {
+ @include space-stack-s;
+
width: 100%
+}
+
+.content-bottom {
+ margin: 0 auto;
}
\ No newline at end of file
diff --git a/styles/shared/DefinitionList.scss b/styles/shared/DefinitionList.scss
index be7a467c..a50561c5 100644
--- a/styles/shared/DefinitionList.scss
+++ b/styles/shared/DefinitionList.scss
@@ -28,8 +28,6 @@ dl.nypl-details-table {
}
border-bottom: 1px solid var(--ui-gray-medium);
-
-
@media (min-width: #{$breakpoint-medium}) {
flex-flow: row;
flex-wrap: wrap;