Skip to content

Commit 30c292a

Browse files
committed
spring cleaning
1 parent eaa7ac2 commit 30c292a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+231
-292
lines changed

app/layout.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
import Providers from '@components/Providers';
2+
13
export default function RootLayout({ children }: { children: React.ReactNode }) {
24
return (
35
<html lang="en">
4-
<body>{children}</body>
6+
<body>
7+
<Providers>{children}</Providers>
8+
</body>
59
</html>
610
);
711
}

app/page.tsx

+49-47
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import '@root/animations.scss';
44
import Bluesky from '@system/svg/social/Bluesky';
55
import DefaultLayout from '@components/DefaultLayout';
66
import ListItem from '@components/ListItem';
7-
import Showcase from '@components/Showcase';
87
import Package from '@root/package.json';
98
import Script from 'next/script';
109

@@ -67,78 +66,81 @@ export default async function Page(props) {
6766
gtag('config', 'GA_MEASUREMENT_ID');
6867
`}
6968
</Script> */}
70-
<div style={{ lineHeight: '1.6', maxWidth: 768 }}>Showcase — Take a look at what we have done with this template</div>
69+
<div style={{ lineHeight: '1.6', maxWidth: 768 }}>Showcase — Take a look at what we have done with this template.</div>
7170
<div>
7271
<ListItem href="https://txt.dev">txt.dev</ListItem>
7372
<ListItem href="https://internet.dev/team">internet.dev</ListItem>
7473
<ListItem href="https://github.com/internet-development/nextjs-sass-starter">nextjs-sass-starter source code</ListItem>
7574
</div>
7675

7776
<div style={{ marginTop: 88, lineHeight: '1.6', maxWidth: 768 }}>
78-
Explore — We have many many examples, components, and templates for{' '}
77+
Explore — We have many many examples, components, and{' '}
7978
<a href="https://github.com/internet-development/nextjs-sass-starter" target="_blank">
80-
nextjs-sass-starter
81-
</a>
82-
, they are for kick-starting your upcoming projects. These serve as an ideal foundation, and feature real production APIs that you can integrate if they meet your project's
83-
needs.
79+
source code
80+
</a>{' '}
81+
for everything listed.
8482
</div>
8583
<div>
8684
<ListItem href="/examples/animations/text-swapping">Animations ➝ text swapping</ListItem>
87-
<ListItem href="/examples/authentication">Authentication to API key</ListItem>
88-
<ListItem href="/examples/authentication-bluesky" isWIP>
85+
86+
<ListItem href="/examples">Components ➝ navigation, hero section</ListItem>
87+
<ListItem href="/examples/components/application-site">Components ➝ application overview, footer</ListItem>
88+
<ListItem href="/examples/components/post">Components ➝ navigation, blog post, footer</ListItem>
89+
<ListItem href="/examples/components/forms">Components ➝ navigation, form elements</ListItem>
90+
<ListItem href="/examples/components/full-section">Components ➝ navigation, full dvh sections</ListItem>
91+
<ListItem href="/examples/components/modals">Components ➝ navigation, index modal trigger</ListItem>
92+
<ListItem href="/examples/components/no-sections">Components ➝ navigation, naked components</ListItem>
93+
<ListItem href="/examples/components/product-marketing">Components ➝ navigation, product marketing</ListItem>
94+
<ListItem href="/examples/components/half-section">Components ➝ navigation, ½ dvh sections</ListItem>
95+
<ListItem href="/examples/components/table">Components ➝ navigation, table</ListItem>
96+
<ListItem href="/examples/components/windows">Components ➝ windows</ListItem>
97+
<ListItem href="/examples/components/windows-connected" isWIP>
98+
Components ➝ windows connected, diagram
99+
</ListItem>
100+
<ListItem href="/examples/components/windows-arrow-connected" isWIP>
101+
Components ➝ windows arrow connected, diagram
102+
</ListItem>
103+
104+
<ListItem href="/examples/empty/application-template-page">Empty ➝ application template page</ListItem>
105+
<ListItem href="/examples/empty/grid-template-page">Empty ➝ grid template page</ListItem>
106+
<ListItem href="/examples/empty/isometric-grid-template-page">Empty ➝ isometric grid template page</ListItem>
107+
108+
<ListItem href="/examples/features/authentication">Features ➝ authentication ➝ to API key</ListItem>
109+
<ListItem href="/examples/features/authentication/bluesky" isWIP>
89110
<Bluesky height="20px" style={{ marginRight: 16 }} />
90-
Authentication with Bluesky to API key
111+
Features ➝ authentication ➝ Bluesky to API key
91112
</ListItem>
92-
<ListItem href="/examples/authentication-google">Authentication with Google to API key</ListItem>
93-
<ListItem href="/examples/components-application-site">Components ➝ application overview, footer</ListItem>
94-
<ListItem href="/examples">Components ➝ navigation, hero section</ListItem>
95-
<ListItem href="/examples/components-post">Components ➝ navigation, blog post, footer</ListItem>
96-
<ListItem href="/examples/components-forms">Components ➝ navigation, form elements</ListItem>
97-
<ListItem href="/examples/components-full-section">Components ➝ navigation, full dvh sections</ListItem>
98-
<ListItem href="/examples/components-modals">Components ➝ navigation, index modal trigger</ListItem>
99-
<ListItem href="/examples/components-no-sections">Components ➝ navigation, naked components</ListItem>
100-
<ListItem href="/examples/components-product-marketing">Components ➝ navigation, product marketing</ListItem>
101-
<ListItem href="/examples/components-half-section">Components ➝ navigation, ½ dvh sections</ListItem>
102-
<ListItem href="/examples/components-table">Components ➝ navigation, table</ListItem>
103-
<ListItem href="/examples/earnings-requirement-calculator">Earnings requirement calculator</ListItem>
104-
<ListItem href="/examples/empty-application-template-page">Empty application template page</ListItem>
105-
<ListItem href="/examples/empty-grid-template-page">Empty grid template page</ListItem>
106-
<ListItem href="/examples/empty-isometric-grid-template-page">Empty isometric grid template page</ListItem>
107-
<ListItem href="/examples/files" isAuth>
108-
File management (with AWS S3 presigned URL)
113+
<ListItem href="/examples/features/authentication/google">Features ➝ authentication ➝ Google to API key</ListItem>
114+
<ListItem href="/examples/features/earnings-requirement-calculator">Features ➝ earnings requirement calculator</ListItem>
115+
<ListItem href="/examples/features/files" isAuth>
116+
Features ➝ file management (with AWS S3 presigned URL)
109117
</ListItem>
110-
<ListItem href="/examples/stocks/fixed-watchlist" isAuth>
111-
Fixed Stock Watchlist
118+
<ListItem href="/examples/features/stocks/fixed-watchlist" isAuth>
119+
Features ➝ fixed stock watchlist
112120
</ListItem>
113-
<ListItem href="/examples/invoices" isAuth>
114-
Invoice management
121+
<ListItem href="/examples/features/invoices" isAuth>
122+
Features ➝ invoice management
115123
</ListItem>
116-
<ListItem href="/examples/job-posting">Job posting</ListItem>
117-
<ListItem href="/examples/services" isAuth>
118-
Purchase services
124+
<ListItem href="/examples/features/job-posting">Features ➝ job posting</ListItem>
125+
<ListItem href="/examples/features/services" isAuth>
126+
Features ➝ purchase services
119127
</ListItem>
120-
<ListItem href="/examples/settings" isAuth isWIP>
121-
Settings
128+
<ListItem href="/examples/features/settings" isAuth isWIP>
129+
Features ➝ settings
122130
</ListItem>
123-
<ListItem href="/examples/statement-of-work" isAuth>
124-
Statement of Work management
131+
<ListItem href="/examples/features/statement-of-work" isAuth>
132+
Features ➝ statement of Work management
125133
</ListItem>
134+
<ListItem href="/examples/features/threads">Features ➝ threads</ListItem>
135+
126136
<ListItem href="/examples/system/colors">System ➝ colors</ListItem>
127137
<ListItem href="/examples/system/typography">System ➝ typography</ListItem>
128138
<ListItem href="/examples/system/data-visualization" isWIP>
129139
System ➝ data visualization
130140
</ListItem>
131-
<ListItem href="/examples/threads">Threads</ListItem>
132-
<ListItem href="/examples/windows">Window management</ListItem>
133-
<ListItem href="/examples/windows-connected" isWIP>
134-
Windows connected, diagram
135-
</ListItem>
136-
<ListItem href="/examples/windows-arrow-connected" isWIP>
137-
Windows arrow connected, diagram
138-
</ListItem>
139141
</div>
140142
<div style={{ marginTop: 88, lineHeight: '1.6', maxWidth: 768 }}>
141-
Are you new to web development and want to work alongside the <a href="https://internet.dev">Internet Development Studio</a> team?
143+
Learn — Are you new and want to work alongside the <a href="https://internet.dev">Internet Development Studio</a> team?
142144
</div>
143145
<div style={{ paddingBottom: 128 }}>
144146
<ListItem href="https://github.com/internet-development/nextjs-sass-starter/issues/2">Part I ➝ Setting up SSH keys locally (MacOS)</ListItem>

common/queries.ts

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const getHeaders = (key) => {
1313
export async function attemptFetch(url, method, headers, body) {
1414
try {
1515
const response = await fetch(url, { method, headers, body });
16-
console.log(response);
1716
const result = await response.json();
1817
return !result.error ? result : null;
1918
} catch (e) {

components/Providers.tsx

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
'use client';
2+
3+
import * as React from 'react';
4+
5+
import { ModalContext } from '@system/providers/ModalContextProvider';
6+
7+
interface ModalContent {
8+
data?: any;
9+
name?: string;
10+
message?: string;
11+
parentId?: string;
12+
}
13+
14+
interface ModalContextType {
15+
modalContent: ModalContent | null;
16+
showModal: (nextContent: ModalContent | null) => void;
17+
}
18+
19+
const initialModalContext: ModalContextType = {
20+
modalContent: null,
21+
showModal: () => {},
22+
};
23+
24+
export default function Providers({ children }) {
25+
const [modalContent, setContent] = React.useState<ModalContent | null>(null);
26+
27+
const showModal = (nextContent) => {
28+
if (nextContent && modalContent && nextContent.name === modalContent.name) {
29+
setContent(null);
30+
return;
31+
}
32+
33+
setContent(nextContent);
34+
};
35+
36+
const modalContextValue: ModalContextType = {
37+
modalContent,
38+
showModal,
39+
};
40+
41+
return <ModalContext.Provider value={modalContextValue}>{children}</ModalContext.Provider>;
42+
}

components/Showcase.module.scss

-33
This file was deleted.

components/Showcase.tsx

-33
This file was deleted.

demos/DemoPricing.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function DemoPricing(props) {
2525
<div className={styles.bottom}>
2626
<H1>Free</H1>
2727
<Text style={{ marginBottom: 24 }}>Forever</Text>
28-
<Button style={{ minHeight: 48 }} href="/examples/authentication">
28+
<Button style={{ minHeight: 48 }} href="/examples/features/authentication">
2929
Sign up
3030
</Button>
3131
<ul className={styles.list}>

demos/DemoServicesAndPaymentsWithLayout.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default function DemoBentoLayout(props) {
4040
Already obtained
4141
</Button>
4242
) : (
43-
<Button style={{ height: 48, marginTop: 24, width: '100%' }} href="/examples/authentication">
43+
<Button style={{ height: 48, marginTop: 24, width: '100%' }} href="/examples/features/authentication">
4444
Sign up
4545
</Button>
4646
)}
@@ -76,7 +76,7 @@ export default function DemoBentoLayout(props) {
7676
</Button>
7777
)
7878
) : (
79-
<Button style={{ height: 48, marginTop: 24, width: '100%' }} href="/examples/authentication">
79+
<Button style={{ height: 48, marginTop: 24, width: '100%' }} href="/examples/features/authentication">
8080
Sign up
8181
</Button>
8282
)}

demos/DemoSettings.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export default function DemoSettings(props) {
2727
</FormParagraph>
2828

2929
<div style={{ marginTop: 48 }}>
30-
<ActionItem icon={`⭢`} href={`/examples/authentication-google`} style={{ marginTop: 16 }}>
30+
<ActionItem icon={`⭢`} href={`/examples/features/authentication/google`} style={{ marginTop: 16 }}>
3131
Authenticate with Google
3232
</ActionItem>
33-
<ActionItem icon={`⭢`} href={`/examples/authentication`}>
33+
<ActionItem icon={`⭢`} href={`/examples/features/authentication`}>
3434
Authenticate
3535
</ActionItem>
3636
</div>
@@ -85,8 +85,8 @@ export default function DemoSettings(props) {
8585
props.data && props.data.length
8686
? props.data.map((each) => {
8787
let link = '#';
88-
if (each.data.type === 'INVOICE') link = `/examples/invoices/${each.id}`;
89-
if (each.data.type === 'STATEMENT_OF_WORK') link = `/examples/statement-of-work/${each.id}`;
88+
if (each.data.type === 'INVOICE') link = `/examples/features/invoices/${each.id}`;
89+
if (each.data.type === 'STATEMENT_OF_WORK') link = `/examples/features/statement-of-work/${each.id}`;
9090

9191
return {
9292
id: each.id,
@@ -114,10 +114,10 @@ export default function DemoSettings(props) {
114114
</div>
115115
<div className={styles.row} style={{ paddingBottom: 88 }}>
116116
<div className={styles.column}>
117-
<ActionItem icon={`⭢`} href={`/examples/invoices`}>
117+
<ActionItem icon={`⭢`} href={`/examples/features/invoices`}>
118118
Manage and edit your invoices
119119
</ActionItem>
120-
<ActionItem icon={`⭢`} href={`/examples/statement-of-work`}>
120+
<ActionItem icon={`⭢`} href={`/examples/features/statement-of-work`}>
121121
Manage and edit your Statement of Works
122122
</ActionItem>
123123
</div>

demos/DemoSettingsSidebar.tsx

+7-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import styles from '@demos/DemoSettingsSidebar.module.scss';
33
import * as React from 'react';
44

55
import ActionItem from '@system/documents/ActionItem';
6-
import Cookies from 'js-cookie';
76

87
const SUB_SECTION_LINKS = {
98
DOCUMENTS: 'Documents',
@@ -17,28 +16,28 @@ const SUB_SECTION_LINKS = {
1716
export default function DemoSettingsSidebar(props) {
1817
return (
1918
<div className={styles.root}>
20-
<ActionItem icon={`⭢`} active={props.active === 'PERSONAL'} href="/examples/settings">
19+
<ActionItem icon={`⭢`} active={props.active === 'PERSONAL'} href="/examples/features/settings">
2120
Settings
2221
</ActionItem>
23-
<ActionItem icon={`⭢`} active={props.active === 'DOCUMENTS'} href="/examples/settings/documents">
22+
<ActionItem icon={`⭢`} active={props.active === 'DOCUMENTS'} href="/examples/features/settings/documents">
2423
{SUB_SECTION_LINKS['DOCUMENTS']}
2524
</ActionItem>
26-
<ActionItem icon={`⭢`} active={props.active === 'CONTENT'} href="/examples/settings/content">
25+
<ActionItem icon={`⭢`} active={props.active === 'CONTENT'} href="/examples/features/settings/content">
2726
{SUB_SECTION_LINKS['CONTENT']}
2827
</ActionItem>
29-
<ActionItem icon={`⭢`} active={props.active === 'CREDITS'} href="/examples/settings/credits">
28+
<ActionItem icon={`⭢`} active={props.active === 'CREDITS'} href="/examples/features/settings/credits">
3029
{SUB_SECTION_LINKS['CREDITS']}
3130
</ActionItem>
32-
<ActionItem icon={`⭢`} active={props.active === 'PURCHASE'} href="/examples/services">
31+
<ActionItem icon={`⭢`} active={props.active === 'PURCHASE'} href="/examples/features/services">
3332
{SUB_SECTION_LINKS['PURCHASE']}
3433
</ActionItem>
3534
{props.viewer ? (
36-
<ActionItem icon={`⭢`} active={props.active === 'END'} href="/examples/settings/end-services">
35+
<ActionItem icon={`⭢`} active={props.active === 'END'} href="/examples/features/settings/end-services">
3736
{SUB_SECTION_LINKS['END']}
3837
</ActionItem>
3938
) : null}
4039
{props.viewer ? (
41-
<ActionItem icon={`⭢`} active={props.active === 'DELETE'} href="/examples/settings/delete-account">
40+
<ActionItem icon={`⭢`} active={props.active === 'DELETE'} href="/examples/features/settings/delete-account">
4241
{SUB_SECTION_LINKS['DELETE']}
4342
</ActionItem>
4443
) : null}

modules/cors.ts

-3
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,4 @@ function middlewareWrapper(o) {
246246
};
247247
}
248248

249-
// can pass either an options hash, an options delegate, or nothing
250-
module.exports = middlewareWrapper;
251-
252249
export default middlewareWrapper;

modules/vary.ts

-7
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88

99
'use strict';
1010

11-
/**
12-
* Module exports.
13-
*/
14-
15-
module.exports = vary;
16-
module.exports.append = append;
17-
1811
/**
1912
* RegExp to match field-name in RFC 7230 sec 3.2
2013
*

0 commit comments

Comments
 (0)