restrucuring

This commit is contained in:
2024-11-20 14:53:30 -05:00
parent 73dc96ad40
commit b29d1b5722
50 changed files with 425 additions and 232 deletions

View 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 = {
};

View File

@@ -0,0 +1,23 @@
{
"name": "disclosure",
"version": "0.0.0",
"private": true,
"main": "./index",
"author": {
"name": "Don Strawsburg",
"email": "don@goforward.group",
"url": "https://goforward.group/"
},
"contributors": [
{
"name": "Don Strawsburg",
"email": "don@goforward.group",
"url": "https://goforward.group/"
},
{
"name": "Sean Strawsburg",
"email": "sean@goforward.group",
"url": "https://goforward.group/"
}
]
}