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,35 @@
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 = {
};

View File

@@ -0,0 +1,23 @@
{
"name": "about",
"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/"
}
]
}

View File

@@ -0,0 +1,39 @@
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 { useQuery, useMutation, gql } from "@apollo/client";
export default function ContactUs(props) {
const GET_SITE_CONTENT = gql`
query Get_Site_Content {
site_contents(where: {content_id: {_eq: "CONTACTUS"}}, 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="body" color="inherit" >
{data.site_contents.map((site_content: { content: any; }) => (
<span dangerouslySetInnerHTML={{ __html: site_content.content }} />
))}
</TypoGraphy>
</div>
)
}
ContactUs.propTypes = {
};

View File

@@ -0,0 +1,23 @@
{
"name": "contactus",
"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/"
}
]
}

View File

@@ -0,0 +1,40 @@
import React, { Component } from 'react';
import { COMPANY_NAME, COMPANY_URL } from '@/app/lib/constants';
import Typography from '@mui/material/Typography';
import MuiLink from '@mui/material/Link';
import styles from './styles.module.css'
import Link from 'next/link'
import styled from '@emotion/styled'
export default class Copyright extends Component {
render() {
return (
(<CopyStyled>
<div className="copyright">&copy;&nbsp; {new Date().getFullYear()} {' '}
<Link href={COMPANY_URL}>
{COMPANY_NAME}
</Link>{' '}
<span>All Rights Reserved.</span>
</div>
</CopyStyled>)
);
}
}
const CopyStyled = styled.div`
.copyright {
background: #4c5c3f;
font-size:.80em;
text-transform: uppercase;
color:#FFF;
display: block;
width:100%;
text-align:center;
a {
color:#FFF;
text-decoration:none;
}
}
`

View File

@@ -0,0 +1,23 @@
{
"name": "copyright",
"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/"
}
]
}

View File

@@ -0,0 +1,7 @@
.white {
color: white;
font-size: .5em;
text-transform: uppercase;
letter-spacing: 2px;
font-family: "hind";
}

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/"
}
]
}

View 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>
)
}

View File

@@ -0,0 +1,23 @@
{
"name": "faq",
"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/"
}
]
}

View File

@@ -0,0 +1,39 @@
import React, { Component } from 'react'
import Head from 'next/head';
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 { useQuery, useMutation, gql } from "@apollo/client";
export default function PIP(props) {
const GET_SITE_CONTENT = gql`
query Get_Site_Content {
site_contents(where: {content_id: {_eq: "PIP"}}, 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>
<Head title="Personal Information" />
<TypoGraphy paragraph='true' variant="body" color="inherit" >
{data.site_contents.map((site_content: { content: any; }) => (
<span dangerouslySetInnerHTML={{ __html: site_content.content }} />
))}
</TypoGraphy>
</div>
)
}
PIP.propTypes = {
};

View File

@@ -0,0 +1,23 @@
{
"name": "pip",
"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/"
}
]
}

View File

@@ -0,0 +1,35 @@
import React, { Component } from 'react'
import TypoGraphy from '@mui/material/Typography';
import Head from 'next/head';
import PropTypes from 'prop-types' //ES6
import styles from './styles.module.css';
import constants from '@/app/lib/constants'
import { useQuery, useMutation, gql } from "@apollo/client";
export default function PrivacyPolicy(props) {
const GET_SITE_CONTENT = gql`
query Get_Site_Content {
site_contents(where: {content_id: {_eq: "PP"}}, 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>
<Head title="Privacy Policy" />
<TypoGraphy paragraph='true' variant="body" color="inherit" >
{data.site_contents.map((site_content: { content: any; }) => (
<span dangerouslySetInnerHTML={{ __html: site_content.content }} />
))}
</TypoGraphy>
</div>
)
}

View File

@@ -0,0 +1,23 @@
{
"name": "privacypolicy",
"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/"
}
]
}

View File

@@ -0,0 +1,38 @@
import React, { Component } from 'react'
import Head from 'next/head';
import TypoGraphy from '@mui/material/Typography';
import PropTypes from 'prop-types' //ES6
import constants from '@/app/lib/constants'
import { useQuery, useMutation, gql } from "@apollo/client";
export default function TermsOfService(props) {
const GET_SITE_CONTENT = gql`
query Get_Site_Content {
site_contents(where: {content_id: {_eq: "TOS"}}, 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>
<Head title="Terms Of Service" />
<TypoGraphy paragraph='true' variant="body" color="inherit" >
<div>
{data.site_contents.map((site_content: { content: any; }) => (
<span dangerouslySetInnerHTML={{ __html: site_content.content }} />
))}
</div>
</TypoGraphy>
</div>
)
}
TermsOfService.propTypes = {
};

View File

@@ -0,0 +1,23 @@
{
"name": "termsofservice",
"version": "0.0.0",
"private": true,
"main": "./index.tsx",
"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/"
}
]
}