Skip to content

Commit

Permalink
Remove typeof hack to test [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
kachkaev committed Jan 21, 2023
1 parent dea0614 commit 2696db0
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 29 deletions.
4 changes: 1 addition & 3 deletions pages/_app.page/page-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import * as React from "react";
import _styled, { createGlobalStyle, css } from "styled-components";
import styled, { createGlobalStyle, css } from "styled-components";
import { normalize } from "styled-normalize";

import { ExternalLink } from "../shared/external-link.jsx";

const styled = _styled as unknown as typeof _styled.default;

const base = css`
body {
color: #24292e;
Expand Down
4 changes: 1 addition & 3 deletions pages/_document.page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _Document, {
import Document, {
DocumentContext,
Head,
Html,
Expand All @@ -8,8 +8,6 @@ import _Document, {
import * as React from "react";
import { ServerStyleSheet } from "styled-components";

const Document = _Document as unknown as typeof _Document.default;

export default class MyDocument extends Document {
static async getInitialProps(ctx: DocumentContext) {
const sheet = new ServerStyleSheet();
Expand Down
4 changes: 1 addition & 3 deletions pages/index.page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import * as React from "react";
import _styled from "styled-components";
import styled from "styled-components";

import { AvailableDestinations } from "./index.page/available-destinations.jsx";
import { Example } from "./index.page/example.jsx";
import { InputForm } from "./index.page/input-form.jsx";
import { ExternalLink } from "./shared/external-link.jsx";
import { PageMetadata } from "./shared/page-metadata.jsx";

const styled = _styled as unknown as typeof _styled.default;

const H2 = styled.h2`
margin-top: 3em;
font-size: 1em;
Expand Down
4 changes: 1 addition & 3 deletions pages/index.page/available-destinations.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import * as React from "react";
import _styled from "styled-components";
import styled from "styled-components";

import { ExternalLink } from "../shared/external-link.jsx";
import { ClickableCode } from "./clickable-code.jsx";

const styled = _styled as unknown as typeof _styled.default;

const Ul = styled.ul`
padding-left: 0;
overflow: hidden;
Expand Down
4 changes: 1 addition & 3 deletions pages/index.page/clickable-code.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import _styled from "styled-components";

const styled = _styled as unknown as typeof _styled.default;
import styled from "styled-components";

export const ClickableCode = styled.code`
border-bottom: 1px dotted transparent;
Expand Down
4 changes: 1 addition & 3 deletions pages/index.page/example.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import * as React from "react";
import _styled from "styled-components";
import styled from "styled-components";

import { ExternalLink } from "../shared/external-link.jsx";
import { ClickableCode } from "./clickable-code.jsx";

const styled = _styled as unknown as typeof _styled.default;

const Remark = styled.span`
white-space: nowrap;
`;
Expand Down
4 changes: 1 addition & 3 deletions pages/index.page/input-form.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as React from "react";
import _styled from "styled-components";

const styled = _styled as unknown as typeof _styled.default;
import styled from "styled-components";

const verticalFormPadding = 20;

Expand Down
7 changes: 2 additions & 5 deletions pages/shared/error-page-body.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import _Link from "next/link.js";
import Link from "next/link.js";
import * as React from "react";
import _styled from "styled-components";

const Link = _Link as unknown as typeof _Link.default;
const styled = _styled as unknown as typeof _styled.default;
import styled from "styled-components";

const Container = styled.div`
text-align: center;
Expand Down
4 changes: 1 addition & 3 deletions pages/shared/page-metadata.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import _Head from "next/head.js";
import Head from "next/head.js";
import * as React from "react";

const Head = _Head as unknown as typeof _Head.default;

const getBaseUrl = () => {
const hostname =
process.env.VERCEL_URL ?? process.env.HOSTNAME ?? "njt.vercel.app";
Expand Down

0 comments on commit 2696db0

Please sign in to comment.