* refactor: web and admin auth related components and update admin designs. * fix: format
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { observer } from "mobx-react";
|
|
import useSWR from "swr";
|
|
import { Loader } from "@plane/ui";
|
|
// components
|
|
import { PageWrapper } from "@/components/common/page-wrapper";
|
|
// hooks
|
|
import { useInstance } from "@/hooks/store";
|
|
// types
|
|
import type { Route } from "./+types/page";
|
|
// local
|
|
import { InstanceImageConfigForm } from "./form";
|
|
|
|
const InstanceImagePage = observer(function InstanceImagePage(_props: Route.ComponentProps) {
|
|
// store
|
|
const { formattedConfig, fetchInstanceConfigurations } = useInstance();
|
|
|
|
useSWR("INSTANCE_CONFIGURATIONS", () => fetchInstanceConfigurations());
|
|
|
|
return (
|
|
<PageWrapper
|
|
header={{
|
|
title: "Third-party image libraries",
|
|
description: "Let your users search and choose images from third-party libraries",
|
|
}}
|
|
>
|
|
{formattedConfig ? (
|
|
<InstanceImageConfigForm config={formattedConfig} />
|
|
) : (
|
|
<Loader className="space-y-8">
|
|
<Loader.Item height="50px" width="50%" />
|
|
<Loader.Item height="50px" width="20%" />
|
|
</Loader>
|
|
)}
|
|
</PageWrapper>
|
|
);
|
|
});
|
|
|
|
export const meta: Route.MetaFunction = () => [{ title: "Images Settings - God Mode" }];
|
|
|
|
export default InstanceImagePage;
|