mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
restructuring folders
This commit is contained in:
34
app/components/Info/Faq/index.tsx
Normal file
34
app/components/Info/Faq/index.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import React, { Component } from 'react';
|
||||
import styles from './styles.module.css'
|
||||
import { useQuery, useMutation, gql } from "@apollo/client";
|
||||
|
||||
export default function Faq(props) {
|
||||
|
||||
const GET_SITE_CONTENT_FAQ = gql`
|
||||
query Get_Site_Content_Faq {
|
||||
site_contents(where: {content_id: {_eq: "FAQ"}}, order_by: {content: asc}) {
|
||||
id
|
||||
content_id
|
||||
content
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const { loading, error, data } = useQuery(GET_SITE_CONTENT_FAQ);
|
||||
if(loading) return "Loading ...";
|
||||
if(error) return `Error! ${error.message}` ;
|
||||
|
||||
return (
|
||||
|
||||
<div className="faq container">
|
||||
{props.children}
|
||||
<h3>Frequently Asked Questions</h3>
|
||||
<div>
|
||||
{data.site_contents.map((site_content: { content: any; }) => (
|
||||
<span dangerouslySetInnerHTML={{__html: site_content.content}}/>
|
||||
))}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user