Skip to content

Commit

Permalink
chore: Add Enhanced API Decomission Notice (#308)
Browse files Browse the repository at this point in the history
* Try setting EAPI mesage to error

* Update warning message after verification

* Remove unnecessary import

* Address prettier issues on changed file

* Update message to final version and remove previous text
  • Loading branch information
darunrs authored Oct 10, 2024
1 parent 6f760f5 commit b93fa6c
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions frontend/modules/apis/components/EnhancedApi.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { API } from '@stoplight/elements';
import { useState } from 'react';

import { Flex } from '@/components/lib/Flex';
import { Message } from '@/components/lib/Message';
Expand All @@ -23,21 +22,18 @@ import * as S from './styles';
*/

const EnhancedAPI = () => {
const [displayMessage, setDisplayMessage] = useState(true);
const { environment } = useSelectedProject();
const url = environment && config.url.eapiSpec[environment.net];

return (
<Flex stack>
{displayMessage && (
<Message
onClickButton={() => {
setDisplayMessage(false);
}}
>
<Text>Want to interact with RPC API? Check out the key tab for the setup guide.</Text>
{
<Message type="error">
<Text>
Enhanced API is being decomissioned by Dec 9, 2024. Please move to another solution before that date.
</Text>
</Message>
)}
}

<S.Root className="e-api">
{url ? <API apiDescriptionUrl={url} router="hash" layout="sidebar" /> : <Spinner center />}
Expand Down

0 comments on commit b93fa6c

Please sign in to comment.