mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-05 18:26:45 -05:00
restructuring folders
This commit is contained in:
54
app/components/Info/Disclosure/index.tsx
Normal file
54
app/components/Info/Disclosure/index.tsx
Normal file
@@ -0,0 +1,54 @@
|
||||
import React, { Component } from 'react'
|
||||
import TypoGraphy from '@mui/material/Typography';
|
||||
import PropTypes from 'prop-types' //ES6
|
||||
import styles from './styles.module.css';
|
||||
import constants from '@/app/lib/constants'
|
||||
import {SITE_CONT_TYPE} from '@/app/lib/constants'
|
||||
import { useQuery, useMutation, gql } from "@apollo/client";
|
||||
|
||||
export default function Disclosure(props) {
|
||||
|
||||
const GET_SITE_CONTENT = gql`
|
||||
query Get_Site_Content {
|
||||
site_contents(where: {content_id: {_eq: ${SITE_CONT_TYPE.DISCLOSURE}}}, 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>
|
||||
<TypoGraphy paragraph={true} variant="body1" color="inherit" >
|
||||
{constants.SITE_NAME}, owned by {constants.COMPANY_NAME}, receives compensation through affiliate relationships with merchants listed on this site. Please know that this in no way affects reviews, benchmarks, content, or this site's opinions of products, services, manufacturers, partners, or merchants.
|
||||
</TypoGraphy>
|
||||
<TypoGraphy paragraph={true} variant="body1" color="inherit" >
|
||||
The mission of {constants.SITE_NAME} is to provide the best functionality for this site's users, regardless of any potential affiliate commissions.
|
||||
{constants.SITE_NAME} does not accept donations. Instead, income received from affiliate relationships funds site maintenance and feature development. If you desire to donate to PCPartPicker, I kindly ask that you consider donating to a charitable organization instead. I am particularly fond of the NRA, a non-profit organization that provides safety training to gun owners.
|
||||
</TypoGraphy>
|
||||
<div>
|
||||
{data.site_contents.map((site_content: { content: any; }) => (
|
||||
<span dangerouslySetInnerHTML={{ __html: site_content.content }} />
|
||||
))}
|
||||
</div>
|
||||
<TypoGraphy paragraph={true} variant="body1" color="inherit" >
|
||||
Thanks,
|
||||
</TypoGraphy>
|
||||
<TypoGraphy paragraph={true} variant="body1" color="inherit" >
|
||||
{constants.COMPANY_NAME}
|
||||
</TypoGraphy>
|
||||
<TypoGraphy paragraph={true} variant="body1" color="inherit" >
|
||||
{constants.SITE_NAME} is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.
|
||||
</TypoGraphy>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Disclosure.propTypes = {
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user