Skip to content

Commit

Permalink
chore: formatted project
Browse files Browse the repository at this point in the history
  • Loading branch information
r34son committed Oct 14, 2023
1 parent 75cd587 commit 5aa1b96
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 68 deletions.
1 change: 1 addition & 0 deletions __tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('Home', () => {
name: /By Vercel Logo/i,
});

// @ts-ignore
expect(heading).toBeInTheDocument();
});
});
4 changes: 2 additions & 2 deletions sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// The config you add here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";
import * as Sentry from '@sentry/nextjs';

Sentry.init({
dsn: "https://784ebd41d9b8753b49f4ad1eb7ba0792@o4506048860258304.ingest.sentry.io/4506048864256000",
dsn: 'https://784ebd41d9b8753b49f4ad1eb7ba0792@o4506048860258304.ingest.sentry.io/4506048864256000',

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
Expand Down
4 changes: 2 additions & 2 deletions sentry.edge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";
import * as Sentry from '@sentry/nextjs';

Sentry.init({
dsn: "https://784ebd41d9b8753b49f4ad1eb7ba0792@o4506048860258304.ingest.sentry.io/4506048864256000",
dsn: 'https://784ebd41d9b8753b49f4ad1eb7ba0792@o4506048860258304.ingest.sentry.io/4506048864256000',

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
Expand Down
4 changes: 2 additions & 2 deletions sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";
import * as Sentry from '@sentry/nextjs';

Sentry.init({
dsn: "https://784ebd41d9b8753b49f4ad1eb7ba0792@o4506048860258304.ingest.sentry.io/4506048864256000",
dsn: 'https://784ebd41d9b8753b49f4ad1eb7ba0792@o4506048860258304.ingest.sentry.io/4506048864256000',

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
Expand Down
21 changes: 7 additions & 14 deletions src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
:root {
--max-width: 1100px;
--border-radius: 12px;
--font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
--font-mono: ui-monospace, menlo, monaco, 'Cascadia Mono', 'Segoe UI Mono',
'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;

--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;

--primary-glow: conic-gradient(
from 180deg at 50% 50%,
#16abff33 0deg,
Expand All @@ -18,10 +16,9 @@
transparent 360deg
);
--secondary-glow: radial-gradient(
rgba(255, 255, 255, 1),
rgba(255, 255, 255, 0)
rgb(255 255 255 / 100%),
rgb(255 255 255 / 0%)
);

--tile-start-rgb: 239, 245, 249;
--tile-end-rgb: 228, 232, 233;
--tile-border: conic-gradient(
Expand All @@ -33,7 +30,6 @@
#00000010,
#00000080
);

--callout-rgb: 238, 240, 241;
--callout-border-rgb: 172, 175, 176;
--card-rgb: 180, 185, 188;
Expand All @@ -45,15 +41,13 @@
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;

--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
--primary-glow: radial-gradient(rgb(1 65 255 / 40%), rgb(1 65 255 / 0%));
--secondary-glow: linear-gradient(
to bottom right,
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0),
rgba(1, 65, 255, 0.3)
rgb(1 65 255 / 0%),
rgb(1 65 255 / 0%),
rgb(1 65 255 / 30%)
);

--tile-start-rgb: 2, 13, 46;
--tile-end-rgb: 2, 5, 19;
--tile-border: conic-gradient(
Expand All @@ -65,7 +59,6 @@
#ffffff10,
#ffffff80
);

--callout-rgb: 20, 20, 20;
--callout-border-rgb: 108, 108, 108;
--card-rgb: 100, 100, 100;
Expand Down
15 changes: 7 additions & 8 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css';
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
import { Analytics } from '@vercel/analytics/react';


const inter = Inter({ subsets: ['latin'] })
const inter = Inter({ subsets: ['latin'] });

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
};

export default function RootLayout({
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
<html lang="en">
Expand All @@ -23,5 +22,5 @@ export default function RootLayout({
<Analytics />
</body>
</html>
)
);
}
29 changes: 17 additions & 12 deletions src/app/page.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
position: relative;
margin: 0;
padding: 1rem;
background-color: rgba(var(--callout-rgb), 0.5);
border: 1px solid rgba(var(--callout-border-rgb), 0.3);
background-color: rgb(var(--callout-rgb) 0.5);
border: 1px solid rgb(var(--callout-border-rgb) 0.3);
border-radius: var(--border-radius);
}

Expand All @@ -49,9 +49,11 @@
.card {
padding: 1rem 1.2rem;
border-radius: var(--border-radius);
background: rgba(var(--card-rgb), 0);
border: 1px solid rgba(var(--card-border-rgb), 0);
transition: background 200ms, border 200ms;
background: rgb(var(--card-rgb) 0);
border: 1px solid rgb(var(--card-border-rgb) 0);
transition:
background 200ms,
border 200ms;
}

.card span {
Expand Down Expand Up @@ -107,11 +109,12 @@
.logo {
position: relative;
}

/* Enable hover only on non-touch devices */
@media (hover: hover) and (pointer: fine) {
.card:hover {
background: rgba(var(--card-rgb), 0.1);
border: 1px solid rgba(var(--card-border-rgb), 0.15);
background: rgb(var(--card-rgb) 0.1);
border: 1px solid rgb(var(--card-border-rgb) 0.15);
}

.card:hover span {
Expand All @@ -126,7 +129,7 @@
}

/* Mobile */
@media (max-width: 700px) {
@media (width <= 700px) {
.content {
padding: 4rem;
}
Expand Down Expand Up @@ -177,11 +180,11 @@
padding: 2rem 1rem 1.4rem;
border-radius: 0;
border: none;
border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
border-bottom: 1px solid rgb(var(--callout-border-rgb) 0.25);
background: linear-gradient(
to bottom,
rgba(var(--background-start-rgb), 1),
rgba(var(--callout-rgb), 0.5)
rgb(var(--background-start-rgb) 1),
rgb(var(--callout-rgb) 0.5)
);
background-clip: padding-box;
backdrop-filter: blur(24px);
Expand All @@ -203,13 +206,14 @@
}

/* Tablet and Smaller Desktop */
@media (min-width: 701px) and (max-width: 1120px) {
@media (width >= 701px) and (width <= 1120px) {
.grid {
grid-template-columns: repeat(2, 50%);
}
}

@media (prefers-color-scheme: dark) {
/* stylelint-disable-next-line selector-class-pattern */
.vercelLogo {
filter: invert(1);
}
Expand All @@ -223,6 +227,7 @@
from {
transform: rotate(360deg);
}

to {
transform: rotate(0deg);
}
Expand Down
6 changes: 3 additions & 3 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from 'next/image'
import styles from './page.module.css'
import Image from 'next/image';
import styles from './page.module.css';

export default function Home() {
return (
Expand Down Expand Up @@ -91,5 +91,5 @@ export default function Home() {
</a>
</div>
</main>
)
);
}
53 changes: 28 additions & 25 deletions src/app/sentry-example-page/page.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
'use client';

import Head from "next/head";
import * as Sentry from "@sentry/nextjs";
import Head from 'next/head';
import * as Sentry from '@sentry/nextjs';

export default function Page() {
return (
Expand All @@ -13,17 +13,17 @@ export default function Page() {

<main
style={{
minHeight: "100vh",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
minHeight: '100vh',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
}}
>
<h1 style={{ fontSize: "4rem", margin: "14px 0" }}>
<h1 style={{ fontSize: '4rem', margin: '14px 0' }}>
<svg
style={{
height: "1em",
height: '1em',
}}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 200 44"
Expand All @@ -39,28 +39,28 @@ export default function Page() {
<button
type="button"
style={{
padding: "12px",
cursor: "pointer",
backgroundColor: "#AD6CAA",
borderRadius: "4px",
border: "none",
color: "white",
fontSize: "14px",
margin: "18px",
padding: '12px',
cursor: 'pointer',
backgroundColor: '#AD6CAA',
borderRadius: '4px',
border: 'none',
color: 'white',
fontSize: '14px',
margin: '18px',
}}
onClick={async () => {
const transaction = Sentry.startTransaction({
name: "Example Frontend Transaction",
name: 'Example Frontend Transaction',
});

Sentry.configureScope((scope) => {
scope.setSpan(transaction);
});

try {
const res = await fetch("/api/sentry-example-api");
const res = await fetch('/api/sentry-example-api');
if (!res.ok) {
throw new Error("Sentry Example Frontend Error");
throw new Error('Sentry Example Frontend Error');
}
} finally {
transaction.finish();
Expand All @@ -71,11 +71,14 @@ export default function Page() {
</button>

<p>
Next, look for the error on the{" "}
<a href="https://r34s0n.sentry.io/issues/?project=4506048864256000">Issues Page</a>.
Next, look for the error on the{' '}
<a href="https://r34s0n.sentry.io/issues/?project=4506048864256000">
Issues Page
</a>
.
</p>
<p style={{ marginTop: "24px" }}>
For more information, see{" "}
<p style={{ marginTop: '24px' }}>
For more information, see{' '}
<a href="https://docs.sentry.io/platforms/javascript/guides/nextjs/">
https://docs.sentry.io/platforms/javascript/guides/nextjs/
</a>
Expand Down

0 comments on commit 5aa1b96

Please sign in to comment.