Files
ballistic-builder/app/components/GB_Info/About/index.tsx

36 lines
876 B
TypeScript
Raw Normal View History

2024-11-15 15:58:34 -05:00
import React, { Component } from 'react'
import PropTypes from 'prop-types' //ES6
import styles from './styles.module.css'
import { useQuery, useMutation, gql } from "@apollo/client";
export default function About(props) {
const GET_SITE_CONTENT = gql`
query Get_Site_Content {
site_contents(where: {content_id: {_eq: "ABOUTUS"}}, order_by: {content: asc}) {
id
content_id
content
}
}
`;
const { loading, error, data } = useQuery(GET_SITE_CONTENT);
if (loading) return "Loading ...";
if (error) return `Error! ${error.message}`;
return (
<div >
<h1>About</h1>
{data.site_contents.map((site_content: { content: any; }) => (
<span dangerouslySetInnerHTML={{ __html: site_content.content }} />
))}
</div>
)
}
About.propTypes = {
};