feat: API config
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// import React from "react";
|
||||
import styled from "styled-components";
|
||||
const Styled = styled.div`
|
||||
max-width: 500px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
gap: 15px;
|
||||
`;
|
||||
import Input from "../../common/component/styled/Input";
|
||||
import Button from "../../common/component/styled/Button";
|
||||
import {
|
||||
useGetThirdPartySecretQuery,
|
||||
useUpdateThirdPartySecretMutation,
|
||||
} from "../../app/services/server";
|
||||
export default function APIConfig() {
|
||||
const { data } = useGetThirdPartySecretQuery();
|
||||
const [
|
||||
updateSecret,
|
||||
{ data: updatedSecret },
|
||||
] = useUpdateThirdPartySecretMutation();
|
||||
console.log("secret", data);
|
||||
return (
|
||||
<Styled>
|
||||
<Input type="password" value={updatedSecret || data} />
|
||||
<Button onClick={updateSecret}>Update Secret</Button>
|
||||
</Styled>
|
||||
);
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import Logins from "./config/Logins";
|
||||
import ConfigFirebase from "./config/Firebase";
|
||||
import ConfigSMTP from "./config/SMTP";
|
||||
import Notifications from "./Notifications";
|
||||
import APIConfig from "./APIConfig";
|
||||
import ManageMembers from "../../common/component/ManageMembers";
|
||||
import FAQ from "../../common/component/FAQ";
|
||||
import ConfigAgora from "./config/Agora";
|
||||
@@ -63,6 +64,11 @@ const navs = [
|
||||
title: "Social Login",
|
||||
component: <Logins />,
|
||||
},
|
||||
{
|
||||
name: "api",
|
||||
title: "API",
|
||||
component: <APIConfig />,
|
||||
},
|
||||
],
|
||||
admin: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user