Skip to content
This repository was archived by the owner on Jun 8, 2022. It is now read-only.

Commit f60efde

Browse files
committed
Remove auto-generated routes type script
This requires more testing in an actual project to sort out any edge cases
1 parent c4c1f0a commit f60efde

File tree

6 files changed

+1
-191
lines changed

6 files changed

+1
-191
lines changed

scripts/esbuild.server.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
22
const pkg = require('../package.json');
3-
const watchPagesFolder = require('./watchPagesFolder');
43

54
const fileName = 'server/index';
65
const isDev = Boolean(process.env.DEV);
@@ -21,12 +20,6 @@ require('esbuild').build({
2120

2221
if (isDev) {
2322
runNextServer();
24-
watchPagesFolder()
25-
.catch((err) => {
26-
console.error(err);
27-
ls.kill();
28-
process.exit(1);
29-
});
3023
}
3124
})
3225
.catch(() => {

scripts/generateRoutesType.js

Lines changed: 0 additions & 128 deletions
This file was deleted.

scripts/watchPagesFolder.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/components/common/interaction/Link.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as i from 'types';
21
import React from 'react';
32
import _ from 'lodash';
43
import NextLink, { LinkProps as NextLinkProps } from 'next/link';
@@ -69,7 +68,7 @@ export const Link: React.FC<LinkProps> = ({
6968

7069
type LinkProps = React.AnchorHTMLAttributes<Element> & Omit<NextLinkProps, 'href'> & {
7170
children: React.ReactNode;
72-
to: i.Routes | `http${string}`;
71+
to: `/${string}` | `http${string}`;
7372
className?: string;
7473
ariaLabel?: string;
7574
currentTab?: boolean;

src/types/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
export * from './general';
33
export * from './redux';
44
export * from './next';
5-
export * from './routes';
65

76
export * from 'styles/types';
87

src/types/routes.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)