saleor-apps-redis_apl/apps/search/src/views/configuration/configuration.view.tsx
Krzysztof Wolski cce2fbc3d5
📧 Improve layout and white-space (#546)
* Bump macaw version

* Make channels section expandable based on override setting

* Add margins to dangerous section, improve copy

* Add padding between section header and its description

* Limit width of provider selection boxes

* Use proper variant of the button

* More whitespace between description and box in the sections

* Remove text

* Revert "Make channels section expandable based on override setting"

This reverts commit e107c5e990b4110156043ed494fb0054bd936654.

* Add changelog

* Improve grammar

Co-authored-by: Adrian Pilarczyk <admin@peelar.dev>

---------

Co-authored-by: Adrian Pilarczyk <admin@peelar.dev>
2023-06-12 13:18:31 +02:00

59 lines
1.9 KiB
TypeScript

import { Box, Text } from "@saleor/macaw-ui/next";
import { AppSection } from "../../components/AppSection";
import { AlgoliaConfigurationForm } from "../../components/AlgoliaConfigurationForm";
import { ImportProductsToAlgolia } from "../../components/ImportProductsToAlgolia";
import { WebhooksStatus } from "../../components/WebhooksStatus";
import { MainInstructions } from "../../components/MainInstructions";
import { WebhooksStatusInstructions } from "../../components/WebhooksStatusInstructions";
import { TextLink } from "@saleor/apps-ui";
const ALGOLIA_DASHBOARD_TOKENS_URL = "https://www.algolia.com/account/api-keys/all";
export const ConfigurationView = () => {
return (
<Box display="flex" flexDirection="column" gap={10}>
<Box>
<Text variant={"hero"} size={"medium"} as={"h1"}>
Configuration
</Text>
<MainInstructions marginTop={1.5} />
</Box>
<AppSection
includePadding
heading="Webhooks status"
sideContent={<WebhooksStatusInstructions />}
mainContent={<WebhooksStatus />}
/>
<AppSection
marginTop={14}
heading="Algolia settings"
mainContent={<AlgoliaConfigurationForm />}
sideContent={
<Box>
<Text as="p" marginBottom={1.5}>
Provide Algolia settings.{" "}
</Text>
<Text>
You can find your tokens in Algolia Dashboard{" "}
<TextLink href={ALGOLIA_DASHBOARD_TOKENS_URL} newTab>
here
</TextLink>
</Text>
</Box>
}
/>
<AppSection
includePadding
marginTop={14}
heading="Index products"
mainContent={<ImportProductsToAlgolia />}
sideContent={
<Box>
<Text>Perform initial index of all products in your Saleor database</Text>
</Box>
}
/>
</Box>
);
};