import { Button, Typography } from 'antd'; import React, { useState, useContext, useEffect } from 'react'; import Link from 'next/link'; import { ServerStatusContext } from '../../../utils/server-status-context'; const { Title } = Typography; export const FediverseNotify = () => { const serverStatusData = useContext(ServerStatusContext); const { serverConfig } = serverStatusData || {}; const { federation } = serverConfig || {}; const { enabled } = federation || {}; const [formDataValues, setFormDataValues] = useState({}); useEffect(() => { setFormDataValues({ enabled, }); }, [enabled]); return ( <> Fediverse Social

Enabling the Fediverse social features will not just alert people to when you go live, but also enable other functionality.

Fediverse social features:{' '} {formDataValues.enabled ? 'Enabled' : 'Disabled'}

); };