Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jontallboy committed Jun 10, 2024
1 parent 8a153d4 commit 8d397d3
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function WeatherForecast({
</div>
</>
) : (
<h2>No data available for {city || 'this area'}</h2>
<h2>No data found, please search another location</h2>
)}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
export function Component() {
return <div>Footer</div>;
import { ModuleFields, TextField } from '@hubspot/cms-components/fields';
import footerStyles from '../../../styles/footer.module.css';

export function Component({ fieldValues }: any) {
return (
<footer className={footerStyles.footer}>
<p>{fieldValues.footerText}</p>
</footer>
);
}

export const fields = [];
export const fields = (
<ModuleFields>
<TextField label="Footer Text" name="footerText" default="Be Well." />
</ModuleFields>
);

export const meta = {
label: 'Footer Module',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import logo from '../../../assets/sprocket.svg';
import headerStyles from '../../../styles/header.module.css';

export function Component({ fieldValues }) {
export function Component({ fieldValues }: any) {
return (
<header className={headerStyles.wrapper}>
<nav>
Expand All @@ -19,7 +19,7 @@ export function Component({ fieldValues }) {
);
}

const DEFAULT_MENU_ID = '53522818668';
const DEFAULT_MENU_ID = '<YOUR_DEFAULT_MENU_ID';

export const fields = (
<ModuleFields>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.footer {
text-align: center;
font-weight: bold;
font-size: 2em;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
:root {
--primary-color: #ff7a59;
--accent-color: #2d3e50;
}

.wrapper {
width: 100%;
background-color: transparent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
--primary-color: #ff7a59;
--primary-color-dark: #e66e50;
--primary-color-med: #ffbcac;
--primary-color-light: #fff1ee;
--secondary-color: #dfe3eb;
--accent-color: #2d3e50;
--light-accent-color: #eaf0f6;
Expand Down
19 changes: 8 additions & 11 deletions examples/getting-started/getting-started-project/src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
{
"compilerOptions": {
"target": "ES2017",
"target": "esnext",
"module": "Node16",
"moduleResolution": "node16",
"strict": true,
"moduleResolution": "Node16",
"esModuleInterop": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"allowImportingTsExtensions": true,
"noEmit": true,
"isolatedModules": true,
"jsx": "react-jsx",
"plugins": [
{
"name": "typescript-plugin-css-modules"
}
]
"skipLibCheck": true,
"types": ["vite/client", "vitest/globals"]
},
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Recommended"
"include": ["components/**/*"],
"exclude": ["node_modules"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function getWeatherIcon(type: string) {
}
}

const apiKey = '20c6efc89fmshc5028f84c47f8a1p19a4a7jsnf3fead1e08a5';
const apiKey = '<YOUR_API_KEY>';

const baseApiUrl = 'https://weatherapi-com.p.rapidapi.com/forecast.json';
const options = {
Expand Down

0 comments on commit 8d397d3

Please sign in to comment.