client: refactor view page components and optimize geist-ui imports
This commit is contained in:
parent
266848e6b2
commit
12cc8bccaa
27 changed files with 255 additions and 293 deletions
|
@ -1,4 +1,5 @@
|
||||||
import { Link as GeistLink, LinkProps } from "@geist-ui/core"
|
import type { LinkProps } from "@geist-ui/core"
|
||||||
|
import GeistLink from "@geist-ui/core/dist/link"
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
const Link = (props: LinkProps) => {
|
const Link = (props: LinkProps) => {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { ButtonGroup, Button } from "@geist-ui/core"
|
import ButtonGroup from "@geist-ui/core/dist/button-group"
|
||||||
|
import Button from "@geist-ui/core/dist/button"
|
||||||
import Bold from '@geist-ui/icons/bold'
|
import Bold from '@geist-ui/icons/bold'
|
||||||
import Italic from '@geist-ui/icons/italic'
|
import Italic from '@geist-ui/icons/italic'
|
||||||
import Link from '@geist-ui/icons/link'
|
import Link from '@geist-ui/icons/link'
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
import { Button, ButtonGroup, Card, Input, Spacer, Tabs, Textarea, Tooltip } from "@geist-ui/core"
|
import Button from "@geist-ui/core/dist/button"
|
||||||
|
import Card from "@geist-ui/core/dist/card"
|
||||||
|
import ButtonGroup from "@geist-ui/core/dist/button-group"
|
||||||
|
import Input from "@geist-ui/core/dist/input"
|
||||||
|
import Spacer from "@geist-ui/core/dist/spacer"
|
||||||
|
import Tabs from "@geist-ui/core/dist/tabs"
|
||||||
|
import Textarea from "@geist-ui/core/dist/textarea"
|
||||||
|
import Tooltip from "@geist-ui/core/dist/tooltip"
|
||||||
|
|
||||||
import { ChangeEvent, memo, useCallback, useMemo, useRef, useState } from "react"
|
import { ChangeEvent, memo, useCallback, useMemo, useRef, useState } from "react"
|
||||||
import styles from './document.module.css'
|
import styles from './document.module.css'
|
||||||
import MarkdownPreview from '../preview'
|
import MarkdownPreview from '../preview'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import MoonIcon from '@geist-ui/icons/moon'
|
import MoonIcon from '@geist-ui/icons/moon'
|
||||||
import SunIcon from '@geist-ui/icons/sun'
|
import SunIcon from '@geist-ui/icons/sun'
|
||||||
import { Select } from '@geist-ui/core'
|
import Select from '@geist-ui/core/dist/select'
|
||||||
// import { useAllThemes, useTheme } from '@geist-ui/core'
|
// import { useAllThemes, useTheme } from '@geist-ui/core'
|
||||||
import styles from './header.module.css'
|
import styles from './header.module.css'
|
||||||
import { ThemeProps } from '@lib/types'
|
import { ThemeProps } from '@lib/types'
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
import { Page, ButtonGroup, Button, useBodyScroll, useMediaQuery, Tabs, Spacer } from "@geist-ui/core";
|
import Page from "@geist-ui/core/dist/page";
|
||||||
|
import ButtonGroup from "@geist-ui/core/dist/button-group";
|
||||||
|
import Button from "@geist-ui/core/dist/button";
|
||||||
|
import useBodyScroll from "@geist-ui/core/dist/use-body-scroll";
|
||||||
|
import useMediaQuery from "@geist-ui/core/dist/use-media-query";
|
||||||
|
import Tabs from "@geist-ui/core/dist/tabs";
|
||||||
|
import Spacer from "@geist-ui/core/dist/spacer";
|
||||||
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import styles from './header.module.css';
|
import styles from './header.module.css';
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
import { Button, ButtonDropdown, useToasts } from '@geist-ui/core'
|
import Button from '@geist-ui/core/dist/button'
|
||||||
|
import useToasts from '@geist-ui/core/dist/use-toasts'
|
||||||
|
import ButtonDropdown from '@geist-ui/core/dist/button-dropdown'
|
||||||
|
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useCallback, useState } from 'react'
|
import { useCallback, useState } from 'react'
|
||||||
import generateUUID from '@lib/generate-uuid';
|
import generateUUID from '@lib/generate-uuid';
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
import { Input, Modal, Note, Spacer } from "@geist-ui/core"
|
import Input from "@geist-ui/core/dist/input"
|
||||||
|
import Modal from "@geist-ui/core/dist/modal"
|
||||||
|
import Note from "@geist-ui/core/dist/note"
|
||||||
|
import Spacer from "@geist-ui/core/dist/spacer"
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { memo } from 'react'
|
import { memo } from 'react'
|
||||||
import { Text, Input } from '@geist-ui/core'
|
import Text from '@geist-ui/core/dist/text'
|
||||||
|
import Input from '@geist-ui/core/dist/input'
|
||||||
|
|
||||||
import ShiftBy from '@components/shift-by'
|
import ShiftBy from '@components/shift-by'
|
||||||
import styles from '../post.module.css'
|
import styles from '../post.module.css'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Text } from "@geist-ui/core"
|
import Text from "@geist-ui/core/dist/text"
|
||||||
import NextLink from "next/link"
|
import NextLink from "next/link"
|
||||||
import Link from '../Link'
|
import Link from '../Link'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
import { Card, Spacer, Grid, Divider } from "@geist-ui/core";
|
import Card from "@geist-ui/core/dist/card";
|
||||||
|
import Spacer from "@geist-ui/core/dist/spacer";
|
||||||
|
import Grid from "@geist-ui/core/dist/grid";
|
||||||
|
import Divider from "@geist-ui/core/dist/divider";
|
||||||
|
|
||||||
import Skeleton from "react-loading-skeleton";
|
import Skeleton from "react-loading-skeleton";
|
||||||
|
|
||||||
const ListItemSkeleton = () => (<Card>
|
const ListItemSkeleton = () => (<Card>
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
import { Card, Spacer, Grid, Divider, Link, Text, Input, Tooltip } from "@geist-ui/core"
|
import Card from "@geist-ui/core/dist/card"
|
||||||
|
import Spacer from "@geist-ui/core/dist/spacer"
|
||||||
|
import Grid from "@geist-ui/core/dist/grid"
|
||||||
|
import Divider from "@geist-ui/core/dist/divider"
|
||||||
|
import Link from "@geist-ui/core/dist/link"
|
||||||
|
import Text from "@geist-ui/core/dist/text"
|
||||||
|
import Input from "@geist-ui/core/dist/input"
|
||||||
|
import Tooltip from "@geist-ui/core/dist/tooltip"
|
||||||
|
|
||||||
import NextLink from "next/link"
|
import NextLink from "next/link"
|
||||||
import { useEffect, useMemo, useState } from "react"
|
import { useEffect, useMemo, useState } from "react"
|
||||||
import timeAgo from "@lib/time-ago"
|
import timeAgo from "@lib/time-ago"
|
||||||
|
|
71
client/components/post-page/index.tsx
Normal file
71
client/components/post-page/index.tsx
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
import Header from "@components/header"
|
||||||
|
import PageSeo from "@components/page-seo"
|
||||||
|
import VisibilityBadge from "@components/visibility-badge"
|
||||||
|
import Page from "@geist-ui/core/dist/page"
|
||||||
|
import Button from "@geist-ui/core/dist/button"
|
||||||
|
import Text from "@geist-ui/core/dist/text"
|
||||||
|
import DocumentComponent from '@components/document'
|
||||||
|
import clientZip from 'client-zip'
|
||||||
|
import styles from './post-page.module.css'
|
||||||
|
|
||||||
|
import type { Post, ThemeProps } from "@lib/types"
|
||||||
|
|
||||||
|
type Props = ThemeProps & {
|
||||||
|
post: Post
|
||||||
|
}
|
||||||
|
|
||||||
|
const PostPage = ({ post, changeTheme, theme }: Props) => {
|
||||||
|
const download = async () => {
|
||||||
|
|
||||||
|
const blob = await clientZip.downloadZip(post.files.map((file: any) => {
|
||||||
|
return {
|
||||||
|
name: file.title,
|
||||||
|
input: file.content,
|
||||||
|
lastModified: new Date(file.updatedAt)
|
||||||
|
}
|
||||||
|
})).blob()
|
||||||
|
const link = document.createElement("a")
|
||||||
|
link.href = URL.createObjectURL(blob)
|
||||||
|
link.download = `${post.title}.zip`
|
||||||
|
link.click()
|
||||||
|
link.remove()
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Page width={"100%"}>
|
||||||
|
<PageSeo
|
||||||
|
title={`${post.title} - Drift`}
|
||||||
|
description={post.description}
|
||||||
|
isPrivate={false}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Page.Header>
|
||||||
|
<Header theme={theme} changeTheme={changeTheme} />
|
||||||
|
</Page.Header>
|
||||||
|
<Page.Content width={"var(--main-content-width)"} margin="auto">
|
||||||
|
{/* {!isLoading && <PostFileExplorer files={post.files} />} */}
|
||||||
|
<div className={styles.header}>
|
||||||
|
<div className={styles.titleAndBadge}>
|
||||||
|
<Text h2>{post.title}</Text>
|
||||||
|
<span><VisibilityBadge visibility={post.visibility} /></span>
|
||||||
|
</div>
|
||||||
|
<Button auto onClick={download}>
|
||||||
|
Download as ZIP archive
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
{post.files.map(({ id, content, title }: { id: any, content: string, title: string }) => (
|
||||||
|
<DocumentComponent
|
||||||
|
key={id}
|
||||||
|
id={id}
|
||||||
|
content={content}
|
||||||
|
title={title}
|
||||||
|
editable={false}
|
||||||
|
initialTab={'preview'}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</Page.Content>
|
||||||
|
</Page >
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PostPage
|
|
@ -1,5 +1,5 @@
|
||||||
import { Badge } from "@geist-ui/core"
|
import Badge from "@geist-ui/core/dist/badge";
|
||||||
import { PostVisibility } from "@lib/types"
|
import type { PostVisibility } from "@lib/types"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
visibility: PostVisibility
|
visibility: PostVisibility
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
const dotenv = require("dotenv");
|
import dotenv from "dotenv";
|
||||||
dotenv.config();
|
import bundleAnalyzer from "@next/bundle-analyzer";
|
||||||
|
|
||||||
const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
dotenv.config();
|
||||||
enabled: process.env.ANALYZE === "true",
|
|
||||||
});
|
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
experimental: {
|
experimental: {
|
||||||
outputStandalone: true,
|
outputStandalone: true,
|
||||||
|
esmExternals: true,
|
||||||
},
|
},
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
return [
|
return [
|
||||||
|
@ -25,4 +24,6 @@ const nextConfig = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = withBundleAnalyzer(nextConfig);
|
export default bundleAnalyzer({ enabled: process.env.ANALYZE === "true" })(
|
||||||
|
nextConfig
|
||||||
|
);
|
|
@ -45,7 +45,7 @@
|
||||||
"@types/react-dom": "^17.0.14",
|
"@types/react-dom": "^17.0.14",
|
||||||
"@types/react-syntax-highlighter": "^13.5.2",
|
"@types/react-syntax-highlighter": "^13.5.2",
|
||||||
"eslint": "8.10.0",
|
"eslint": "8.10.0",
|
||||||
"eslint-config-next": "12.1.0",
|
"eslint-config-next": "^12.1.1-canary.16",
|
||||||
"typescript": "4.6.2",
|
"typescript": "4.6.2",
|
||||||
"typescript-plugin-css-modules": "^3.4.0"
|
"typescript-plugin-css-modules": "^3.4.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
import '@styles/globals.css'
|
import '@styles/globals.css'
|
||||||
import { GeistProvider, CssBaseline, useTheme } from '@geist-ui/core'
|
import GeistProvider from '@geist-ui/core/dist/geist-provider'
|
||||||
|
import CssBaseline from '@geist-ui/core/dist/css-baseline'
|
||||||
|
import useTheme from '@geist-ui/core/dist/use-theme'
|
||||||
|
|
||||||
import { useEffect, useMemo, useState } from 'react'
|
import { useEffect, useMemo, useState } from 'react'
|
||||||
import type { AppProps as NextAppProps } from "next/app";
|
import type { AppProps as NextAppProps } from "next/app";
|
||||||
import useSharedState from '@lib/hooks/use-shared-state';
|
import useSharedState from '@lib/hooks/use-shared-state';
|
||||||
|
@ -7,7 +10,7 @@ import useSharedState from '@lib/hooks/use-shared-state';
|
||||||
import 'react-loading-skeleton/dist/skeleton.css'
|
import 'react-loading-skeleton/dist/skeleton.css'
|
||||||
import { SkeletonTheme } from 'react-loading-skeleton';
|
import { SkeletonTheme } from 'react-loading-skeleton';
|
||||||
import Head from 'next/head';
|
import Head from 'next/head';
|
||||||
import { ThemeProps } from '@lib/types';
|
import type { ThemeProps } from '@lib/types';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
|
|
||||||
type AppProps<P = any> = {
|
type AppProps<P = any> = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Document, { Html, Head, Main, NextScript, DocumentContext } from 'next/document'
|
import Document, { Html, Head, Main, NextScript, DocumentContext } from 'next/document'
|
||||||
import { CssBaseline } from '@geist-ui/core'
|
import CssBaseline from '@geist-ui/core/dist/css-baseline'
|
||||||
|
|
||||||
class MyDocument extends Document {
|
class MyDocument extends Document {
|
||||||
static async getInitialProps(ctx: DocumentContext) {
|
static async getInitialProps(ctx: DocumentContext) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import styles from '@styles/Home.module.css'
|
import styles from '@styles/Home.module.css'
|
||||||
import { Page, Spacer, Text } from '@geist-ui/core'
|
import Page from '@geist-ui/core/dist/page'
|
||||||
|
import Spacer from '@geist-ui/core/dist/spacer'
|
||||||
|
import Text from '@geist-ui/core/dist/text'
|
||||||
import Header from '@components/header'
|
import Header from '@components/header'
|
||||||
import Document from '@components/document'
|
import Document from '@components/document'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import styles from '@styles/Home.module.css'
|
import styles from '@styles/Home.module.css'
|
||||||
import { Page } from '@geist-ui/core'
|
import Page from '@geist-ui/core/dist/page'
|
||||||
|
|
||||||
import Header from '@components/header'
|
import Header from '@components/header'
|
||||||
import MyPosts from '@components/my-posts'
|
import MyPosts from '@components/my-posts'
|
||||||
import cookie from "cookie";
|
import cookie from "cookie";
|
||||||
import { GetServerSideProps } from 'next';
|
import type { GetServerSideProps } from 'next';
|
||||||
import { ThemeProps } from '@lib/types';
|
import type { ThemeProps } from '@lib/types';
|
||||||
|
|
||||||
const Home = ({ posts, error, theme, changeTheme }: ThemeProps & { posts: any; error: any; }) => {
|
const Home = ({ posts, error, theme, changeTheme }: ThemeProps & { posts: any; error: any; }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
import styles from '@styles/Home.module.css'
|
import styles from '@styles/Home.module.css'
|
||||||
import NewPost from '@components/new-post'
|
import NewPost from '@components/new-post'
|
||||||
import { Page } from '@geist-ui/core'
|
import Page from '@geist-ui/core/dist/page'
|
||||||
import useSignedIn from '@lib/hooks/use-signed-in'
|
|
||||||
import Header from '@components/header'
|
import Header from '@components/header'
|
||||||
import PageSeo from '@components/page-seo'
|
import PageSeo from '@components/page-seo'
|
||||||
import { ThemeProps } from '@lib/types'
|
import type { ThemeProps } from '@lib/types'
|
||||||
|
|
||||||
const New = ({ theme, changeTheme }: ThemeProps) => {
|
const New = ({ theme, changeTheme }: ThemeProps) => {
|
||||||
const isSignedIn = useSignedIn()
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page className={styles.container} width="100%">
|
<Page className={styles.container} width="100%">
|
||||||
<PageSeo title="Drift - New" />
|
<PageSeo title="Drift - New" />
|
||||||
|
@ -18,7 +15,7 @@ const New = ({ theme, changeTheme }: ThemeProps) => {
|
||||||
</Page.Header>
|
</Page.Header>
|
||||||
|
|
||||||
<Page.Content paddingTop={"var(--gap)"} width={"var(--main-content-width)"} margin="0 auto" className={styles.main}>
|
<Page.Content paddingTop={"var(--gap)"} width={"var(--main-content-width)"} margin="0 auto" className={styles.main}>
|
||||||
{isSignedIn && <NewPost />}
|
<NewPost />
|
||||||
</Page.Content>
|
</Page.Content>
|
||||||
</Page >
|
</Page >
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,70 +1,14 @@
|
||||||
import { Button, Page, Text } from "@geist-ui/core";
|
|
||||||
|
|
||||||
import Document from '@components/document'
|
|
||||||
import Header from "@components/header";
|
|
||||||
import VisibilityBadge from "@components/visibility-badge";
|
|
||||||
import PageSeo from "components/page-seo";
|
|
||||||
import styles from './styles.module.css';
|
|
||||||
import type { GetStaticPaths, GetStaticProps } from "next";
|
import type { GetStaticPaths, GetStaticProps } from "next";
|
||||||
import { Post, ThemeProps } from "@lib/types";
|
|
||||||
|
import type { Post, ThemeProps } from "@lib/types";
|
||||||
|
import PostPage from "@components/post-page";
|
||||||
|
|
||||||
export type PostProps = ThemeProps & {
|
export type PostProps = ThemeProps & {
|
||||||
post: Post
|
post: Post
|
||||||
}
|
}
|
||||||
|
|
||||||
const Post = ({ post, theme, changeTheme }: PostProps) => {
|
const PostView = ({ post, theme, changeTheme }: PostProps) => {
|
||||||
const download = async () => {
|
return <PostPage post={post} theme={theme} changeTheme={changeTheme} />
|
||||||
const clientZip = require("client-zip")
|
|
||||||
|
|
||||||
const blob = await clientZip.downloadZip(post.files.map((file: any) => {
|
|
||||||
return {
|
|
||||||
name: file.title,
|
|
||||||
input: file.content,
|
|
||||||
lastModified: new Date(file.updatedAt)
|
|
||||||
}
|
|
||||||
})).blob()
|
|
||||||
const link = document.createElement("a")
|
|
||||||
link.href = URL.createObjectURL(blob)
|
|
||||||
link.download = `${post.title}.zip`
|
|
||||||
link.click()
|
|
||||||
link.remove()
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Page width={"100%"}>
|
|
||||||
<PageSeo
|
|
||||||
title={`${post.title} - Drift`}
|
|
||||||
description={post.description}
|
|
||||||
isPrivate={false}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Page.Header>
|
|
||||||
<Header theme={theme} changeTheme={changeTheme} />
|
|
||||||
</Page.Header>
|
|
||||||
<Page.Content width={"var(--main-content-width)"} margin="auto">
|
|
||||||
{/* {!isLoading && <PostFileExplorer files={post.files} />} */}
|
|
||||||
<div className={styles.header}>
|
|
||||||
<div className={styles.titleAndBadge}>
|
|
||||||
<Text h2>{post.title}</Text>
|
|
||||||
<span><VisibilityBadge visibility={post.visibility} /></span>
|
|
||||||
</div>
|
|
||||||
<Button auto onClick={download}>
|
|
||||||
Download as ZIP archive
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
{post.files.map(({ id, content, title }: { id: any, content: string, title: string }) => (
|
|
||||||
<Document
|
|
||||||
key={id}
|
|
||||||
id={id}
|
|
||||||
content={content}
|
|
||||||
title={title}
|
|
||||||
editable={false}
|
|
||||||
initialTab={'preview'}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</Page.Content>
|
|
||||||
</Page >
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getStaticPaths: GetStaticPaths = async () => {
|
export const getStaticPaths: GetStaticPaths = async () => {
|
||||||
|
@ -101,5 +45,5 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Post
|
export default PostView
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
import { Button, Page, Text } from "@geist-ui/core";
|
|
||||||
|
|
||||||
import Document from '@components/document'
|
|
||||||
import Header from "@components/header";
|
|
||||||
import VisibilityBadge from "@components/visibility-badge";
|
|
||||||
import PageSeo from "components/page-seo";
|
|
||||||
import styles from '../styles.module.css';
|
|
||||||
import cookie from "cookie";
|
import cookie from "cookie";
|
||||||
import type { GetServerSideProps } from "next";
|
import type { GetServerSideProps } from "next";
|
||||||
import { PostVisibility, ThemeProps } from "@lib/types";
|
import { PostVisibility, ThemeProps } from "@lib/types";
|
||||||
|
import PostPage from "@components/post-page";
|
||||||
|
|
||||||
type File = {
|
type File = {
|
||||||
id: string
|
id: string
|
||||||
|
@ -28,58 +22,7 @@ export type PostProps = ThemeProps & {
|
||||||
}
|
}
|
||||||
|
|
||||||
const Post = ({ post, theme, changeTheme }: PostProps) => {
|
const Post = ({ post, theme, changeTheme }: PostProps) => {
|
||||||
const download = async () => {
|
return (<PostPage post={post} changeTheme={changeTheme} theme={theme} />)
|
||||||
const clientZip = require("client-zip")
|
|
||||||
|
|
||||||
const blob = await clientZip.downloadZip(post.files.map((file: any) => {
|
|
||||||
return {
|
|
||||||
name: file.title,
|
|
||||||
input: file.content,
|
|
||||||
lastModified: new Date(file.updatedAt)
|
|
||||||
}
|
|
||||||
})).blob()
|
|
||||||
const link = document.createElement("a")
|
|
||||||
link.href = URL.createObjectURL(blob)
|
|
||||||
link.download = `${post.title}.zip`
|
|
||||||
link.click()
|
|
||||||
link.remove()
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Page width={"100%"}>
|
|
||||||
<PageSeo
|
|
||||||
title={`${post.title} - Drift`}
|
|
||||||
description={post.description}
|
|
||||||
isPrivate={true}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Page.Header>
|
|
||||||
<Header theme={theme} changeTheme={changeTheme} />
|
|
||||||
</Page.Header>
|
|
||||||
<Page.Content width={"var(--main-content-width)"} margin="auto">
|
|
||||||
{/* {!isLoading && <PostFileExplorer files={post.files} />} */}
|
|
||||||
<div className={styles.header}>
|
|
||||||
<div className={styles.titleAndBadge}>
|
|
||||||
<Text h2>{post.title}</Text>
|
|
||||||
<span><VisibilityBadge visibility={post.visibility} /></span>
|
|
||||||
</div>
|
|
||||||
<Button auto onClick={download}>
|
|
||||||
Download as ZIP archive
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
{post.files.map(({ id, content, title }: { id: any, content: string, title: string }) => (
|
|
||||||
<Document
|
|
||||||
key={id}
|
|
||||||
id={id}
|
|
||||||
content={content}
|
|
||||||
title={title}
|
|
||||||
editable={false}
|
|
||||||
initialTab={'preview'}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</Page.Content>
|
|
||||||
</Page >
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getServerSideProps: GetServerSideProps = async (context) => {
|
export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||||
|
|
|
@ -1,38 +1,18 @@
|
||||||
import { Button, Page, Text, useToasts } from "@geist-ui/core";
|
import useToasts from "@geist-ui/core/dist/use-toasts";
|
||||||
|
import Page from "@geist-ui/core/dist/page";
|
||||||
|
|
||||||
import Document from '@components/document'
|
import type { Post, ThemeProps } from "@lib/types";
|
||||||
import Header from "@components/header";
|
|
||||||
import VisibilityBadge from "@components/visibility-badge";
|
|
||||||
import PageSeo from "components/page-seo";
|
|
||||||
import styles from '../styles.module.css';
|
|
||||||
import { Post, ThemeProps } from "@lib/types";
|
|
||||||
import PasswordModal from "@components/new-post/password";
|
import PasswordModal from "@components/new-post/password";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
|
import PostPage from "@components/post-page";
|
||||||
|
|
||||||
const Post = ({ theme, changeTheme }: ThemeProps) => {
|
const Post = ({ theme, changeTheme }: ThemeProps) => {
|
||||||
const [isPasswordModalOpen, setIsPasswordModalOpen] = useState(true);
|
const [isPasswordModalOpen, setIsPasswordModalOpen] = useState(true);
|
||||||
const [post, setPost] = useState<Post>()
|
const [post, setPost] = useState<Post>()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { setToast } = useToasts()
|
const { setToast } = useToasts()
|
||||||
const download = async () => {
|
|
||||||
if (!post) return;
|
|
||||||
const clientZip = require("client-zip")
|
|
||||||
|
|
||||||
const blob = await clientZip.downloadZip(post.files.map((file: any) => {
|
|
||||||
return {
|
|
||||||
name: file.title,
|
|
||||||
input: file.content,
|
|
||||||
lastModified: new Date(file.updatedAt)
|
|
||||||
}
|
|
||||||
})).blob()
|
|
||||||
const link = document.createElement("a")
|
|
||||||
link.href = URL.createObjectURL(blob)
|
|
||||||
link.download = `${post.title}.zip`
|
|
||||||
link.click()
|
|
||||||
link.remove()
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (router.isReady) {
|
if (router.isReady) {
|
||||||
|
@ -94,40 +74,7 @@ const Post = ({ theme, changeTheme }: ThemeProps) => {
|
||||||
return <Page><PasswordModal creating={false} onClose={onClose} onSubmit={onSubmit} isOpen={isPasswordModalOpen} /></Page>
|
return <Page><PasswordModal creating={false} onClose={onClose} onSubmit={onSubmit} isOpen={isPasswordModalOpen} /></Page>
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (<PostPage post={post} changeTheme={changeTheme} theme={theme} />)
|
||||||
<Page width={"100%"}>
|
|
||||||
<PageSeo
|
|
||||||
title={`${post.title} - Drift`}
|
|
||||||
description={post.description}
|
|
||||||
isPrivate={true}
|
|
||||||
/>
|
|
||||||
<Page.Header>
|
|
||||||
<Header theme={theme} changeTheme={changeTheme} />
|
|
||||||
</Page.Header>
|
|
||||||
<Page.Content width={"var(--main-content-width)"} margin="auto">
|
|
||||||
{/* {!isLoading && <PostFileExplorer files={post.files} />} */}
|
|
||||||
<div className={styles.header}>
|
|
||||||
<div className={styles.titleAndBadge}>
|
|
||||||
<Text h2>{post.title}</Text>
|
|
||||||
<span><VisibilityBadge visibility={post.visibility} /></span>
|
|
||||||
</div>
|
|
||||||
<Button auto onClick={download}>
|
|
||||||
Download as ZIP archive
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
{post.files.map(({ id, content, title }: { id: any, content: string, title: string }) => (
|
|
||||||
<Document
|
|
||||||
key={id}
|
|
||||||
id={id}
|
|
||||||
content={content}
|
|
||||||
title={title}
|
|
||||||
editable={false}
|
|
||||||
initialTab={'preview'}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</Page.Content>
|
|
||||||
</Page >
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Post
|
export default Post
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Page } from "@geist-ui/core";
|
import Page from "@geist-ui/core/dist/page";
|
||||||
import PageSeo from "@components/page-seo";
|
import PageSeo from "@components/page-seo";
|
||||||
import Auth from "@components/auth";
|
import Auth from "@components/auth";
|
||||||
import Header from "@components/header";
|
import Header from "@components/header";
|
||||||
import { ThemeProps } from "@lib/types";
|
import type { ThemeProps } from "@lib/types";
|
||||||
|
|
||||||
const SignIn = ({ theme, changeTheme }: ThemeProps) => (
|
const SignIn = ({ theme, changeTheme }: ThemeProps) => (
|
||||||
<Page width={"100%"}>
|
<Page width={"100%"}>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Page } from "@geist-ui/core";
|
import Page from "@geist-ui/core/dist/page";
|
||||||
import Auth from "@components/auth";
|
import Auth from "@components/auth";
|
||||||
import Header from "@components/header";
|
import Header from "@components/header";
|
||||||
import PageSeo from '@components/page-seo';
|
import PageSeo from '@components/page-seo';
|
||||||
import { ThemeProps } from "@lib/types";
|
import type { ThemeProps } from "@lib/types";
|
||||||
|
|
||||||
const SignUp = ({ theme, changeTheme }: ThemeProps) => (
|
const SignUp = ({ theme, changeTheme }: ThemeProps) => (
|
||||||
<Page width="100%">
|
<Page width="100%">
|
||||||
|
|
170
client/yarn.lock
170
client/yarn.lock
|
@ -70,10 +70,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.1-canary.15.tgz#d1c210df31c8865042f2b81ffb37660b9cc70045"
|
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.1-canary.15.tgz#d1c210df31c8865042f2b81ffb37660b9cc70045"
|
||||||
integrity sha512-2r7r5r/+hSgCTeGTMErGwlxiawNX3RGCKrgWGyyIYKGcJ2xunxN3ScDKIAjGa77eOWGm4JccB4T6xXwmPUut5g==
|
integrity sha512-2r7r5r/+hSgCTeGTMErGwlxiawNX3RGCKrgWGyyIYKGcJ2xunxN3ScDKIAjGa77eOWGm4JccB4T6xXwmPUut5g==
|
||||||
|
|
||||||
"@next/eslint-plugin-next@12.1.0":
|
"@next/eslint-plugin-next@12.1.1-canary.16":
|
||||||
version "12.1.0"
|
version "12.1.1-canary.16"
|
||||||
resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.0.tgz#32586a11378b3ffa5a93ac40a3c44ad99d70e95a"
|
resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.1-canary.16.tgz#3fa21ef32c88e7b73b479ef559843c936dbddc95"
|
||||||
integrity sha512-WFiyvSM2G5cQmh32t/SiQuJ+I2O+FHVlK/RFw5b1565O2kEM/36EXncjt88Pa+X5oSc+1SS+tWxowWJd1lqI+g==
|
integrity sha512-u0uYF7hmexjMoqwai9NaVFbgTB4cdWdwSq697FK/JUqgazoT/fecvpOYOLZ9v8oTZvKpSUpANwp8WhAytAysuw==
|
||||||
dependencies:
|
dependencies:
|
||||||
glob "7.1.7"
|
glob "7.1.7"
|
||||||
|
|
||||||
|
@ -163,10 +163,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1"
|
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1"
|
||||||
integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==
|
integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==
|
||||||
|
|
||||||
"@rushstack/eslint-patch@^1.0.8":
|
"@rushstack/eslint-patch@1.0.8":
|
||||||
version "1.1.0"
|
version "1.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.1.0.tgz#7f698254aadf921e48dda8c0a6b304026b8a9323"
|
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.0.8.tgz#be3e914e84eacf16dbebd311c0d0b44aa1174c64"
|
||||||
integrity sha512-JLo+Y592QzIE+q7Dl2pMUtt4q8SKYI5jDrZxrozEQxnGVOyYE+GWK9eLkwTaeN9DDctlaRAQ3TBmzZ1qdLE30A==
|
integrity sha512-ZK5v4bJwgXldAUA8r3q9YKfCwOqoHTK/ZqRjSeRXQrBXWouoPnS4MQtgC4AXGiiBuUu5wxrRgTlv0ktmM4P1Aw==
|
||||||
|
|
||||||
"@types/cookie@^0.4.1":
|
"@types/cookie@^0.4.1":
|
||||||
version "0.4.1"
|
version "0.4.1"
|
||||||
|
@ -272,48 +272,48 @@
|
||||||
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
|
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
|
||||||
integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==
|
integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==
|
||||||
|
|
||||||
"@typescript-eslint/parser@^5.0.0":
|
"@typescript-eslint/parser@5.10.1":
|
||||||
version "5.13.0"
|
version "5.10.1"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.13.0.tgz#0394ed8f2f849273c0bf4b811994d177112ced5c"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.10.1.tgz#4ce9633cc33fc70bc13786cb793c1a76fe5ad6bd"
|
||||||
integrity sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==
|
integrity sha512-GReo3tjNBwR5RnRO0K2wDIDN31cM3MmDtgyQ85oAxAmC5K3j/g85IjP+cDfcqDsDDBf1HNKQAD0WqOYL8jXqUA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/scope-manager" "5.13.0"
|
"@typescript-eslint/scope-manager" "5.10.1"
|
||||||
"@typescript-eslint/types" "5.13.0"
|
"@typescript-eslint/types" "5.10.1"
|
||||||
"@typescript-eslint/typescript-estree" "5.13.0"
|
"@typescript-eslint/typescript-estree" "5.10.1"
|
||||||
debug "^4.3.2"
|
debug "^4.3.2"
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager@5.13.0":
|
"@typescript-eslint/scope-manager@5.10.1":
|
||||||
version "5.13.0"
|
version "5.10.1"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz#cf6aff61ca497cb19f0397eea8444a58f46156b6"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.10.1.tgz#f0539c73804d2423506db2475352a4dec36cd809"
|
||||||
integrity sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==
|
integrity sha512-Lyvi559Gvpn94k7+ElXNMEnXu/iundV5uFmCUNnftbFrUbAJ1WBoaGgkbOBm07jVZa682oaBU37ao/NGGX4ZDg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types" "5.13.0"
|
"@typescript-eslint/types" "5.10.1"
|
||||||
"@typescript-eslint/visitor-keys" "5.13.0"
|
"@typescript-eslint/visitor-keys" "5.10.1"
|
||||||
|
|
||||||
"@typescript-eslint/types@5.13.0":
|
"@typescript-eslint/types@5.10.1":
|
||||||
version "5.13.0"
|
version "5.10.1"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.13.0.tgz#da1de4ae905b1b9ff682cab0bed6b2e3be9c04e5"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.10.1.tgz#dca9bd4cb8c067fc85304a31f38ec4766ba2d1ea"
|
||||||
integrity sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==
|
integrity sha512-ZvxQ2QMy49bIIBpTqFiOenucqUyjTQ0WNLhBM6X1fh1NNlYAC6Kxsx8bRTY3jdYsYg44a0Z/uEgQkohbR0H87Q==
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree@5.13.0":
|
"@typescript-eslint/typescript-estree@5.10.1":
|
||||||
version "5.13.0"
|
version "5.10.1"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz#b37c07b748ff030a3e93d87c842714e020b78141"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.1.tgz#b268e67be0553f8790ba3fe87113282977adda15"
|
||||||
integrity sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==
|
integrity sha512-PwIGnH7jIueXv4opcwEbVGDATjGPO1dx9RkUl5LlHDSe+FXxPwFL5W/qYd5/NHr7f6lo/vvTrAzd0KlQtRusJQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types" "5.13.0"
|
"@typescript-eslint/types" "5.10.1"
|
||||||
"@typescript-eslint/visitor-keys" "5.13.0"
|
"@typescript-eslint/visitor-keys" "5.10.1"
|
||||||
debug "^4.3.2"
|
debug "^4.3.2"
|
||||||
globby "^11.0.4"
|
globby "^11.0.4"
|
||||||
is-glob "^4.0.3"
|
is-glob "^4.0.3"
|
||||||
semver "^7.3.5"
|
semver "^7.3.5"
|
||||||
tsutils "^3.21.0"
|
tsutils "^3.21.0"
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys@5.13.0":
|
"@typescript-eslint/visitor-keys@5.10.1":
|
||||||
version "5.13.0"
|
version "5.10.1"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz#f45ff55bcce16403b221ac9240fbeeae4764f0fd"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.1.tgz#29102de692f59d7d34ecc457ed59ab5fc558010b"
|
||||||
integrity sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==
|
integrity sha512-NjQ0Xinhy9IL979tpoTRuLKxMc0zJC7QVSdeerXs2/QvOy2yRkzX5dRb10X5woNUdJgU8G3nYRDlI33sq1K4YQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types" "5.13.0"
|
"@typescript-eslint/types" "5.10.1"
|
||||||
eslint-visitor-keys "^3.0.0"
|
eslint-visitor-keys "^3.0.0"
|
||||||
|
|
||||||
acorn-jsx@^5.3.1:
|
acorn-jsx@^5.3.1:
|
||||||
|
@ -707,7 +707,7 @@ debug@^3.2.6, debug@^3.2.7:
|
||||||
dependencies:
|
dependencies:
|
||||||
ms "^2.1.1"
|
ms "^2.1.1"
|
||||||
|
|
||||||
debug@^4.0.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
|
debug@^4.0.0, debug@^4.1.1, debug@^4.3.2:
|
||||||
version "4.3.3"
|
version "4.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664"
|
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664"
|
||||||
integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==
|
integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==
|
||||||
|
@ -866,22 +866,30 @@ escape-string-regexp@^5.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8"
|
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8"
|
||||||
integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==
|
integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==
|
||||||
|
|
||||||
eslint-config-next@12.1.0:
|
eslint-config-next@^12.1.1-canary.16:
|
||||||
version "12.1.0"
|
version "12.1.1-canary.16"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-12.1.0.tgz#8ace680dc5207e6ab6c915f3989adec122f582e7"
|
resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-12.1.1-canary.16.tgz#737f3c060c48d05da68b1c0b0eceb7ac99addd97"
|
||||||
integrity sha512-tBhuUgoDITcdcM7xFvensi9I5WTI4dnvH4ETGRg1U8ZKpXrZsWQFdOKIDzR3RLP5HR3xXrLviaMM4c3zVoE/pA==
|
integrity sha512-CyA4cd0gqlNLDgMgbDEIHt9gtXADQhbIP/5UVB4XIVmAP1z1cya5PxW203up+I7mzUNDtqwNMzt/JWCLCREBpg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@next/eslint-plugin-next" "12.1.0"
|
"@next/eslint-plugin-next" "12.1.1-canary.16"
|
||||||
"@rushstack/eslint-patch" "^1.0.8"
|
"@rushstack/eslint-patch" "1.0.8"
|
||||||
"@typescript-eslint/parser" "^5.0.0"
|
"@typescript-eslint/parser" "5.10.1"
|
||||||
eslint-import-resolver-node "^0.3.4"
|
eslint-import-resolver-node "0.3.4"
|
||||||
eslint-import-resolver-typescript "^2.4.0"
|
eslint-import-resolver-typescript "2.4.0"
|
||||||
eslint-plugin-import "^2.25.2"
|
eslint-plugin-import "2.25.2"
|
||||||
eslint-plugin-jsx-a11y "^6.5.1"
|
eslint-plugin-jsx-a11y "6.5.1"
|
||||||
eslint-plugin-react "^7.27.0"
|
eslint-plugin-react "7.29.1"
|
||||||
eslint-plugin-react-hooks "^4.3.0"
|
eslint-plugin-react-hooks "4.3.0"
|
||||||
|
|
||||||
eslint-import-resolver-node@^0.3.4, eslint-import-resolver-node@^0.3.6:
|
eslint-import-resolver-node@0.3.4:
|
||||||
|
version "0.3.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717"
|
||||||
|
integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==
|
||||||
|
dependencies:
|
||||||
|
debug "^2.6.9"
|
||||||
|
resolve "^1.13.1"
|
||||||
|
|
||||||
|
eslint-import-resolver-node@^0.3.6:
|
||||||
version "0.3.6"
|
version "0.3.6"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"
|
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"
|
||||||
integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==
|
integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==
|
||||||
|
@ -889,18 +897,18 @@ eslint-import-resolver-node@^0.3.4, eslint-import-resolver-node@^0.3.6:
|
||||||
debug "^3.2.7"
|
debug "^3.2.7"
|
||||||
resolve "^1.20.0"
|
resolve "^1.20.0"
|
||||||
|
|
||||||
eslint-import-resolver-typescript@^2.4.0:
|
eslint-import-resolver-typescript@2.4.0:
|
||||||
version "2.5.0"
|
version "2.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.5.0.tgz#07661966b272d14ba97f597b51e1a588f9722f0a"
|
resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.4.0.tgz#ec1e7063ebe807f0362a7320543aaed6fe1100e1"
|
||||||
integrity sha512-qZ6e5CFr+I7K4VVhQu3M/9xGv9/YmwsEXrsm3nimw8vWaVHRDrQRp26BgCypTxBp3vUp4o5aVEJRiy0F2DFddQ==
|
integrity sha512-useJKURidCcldRLCNKWemr1fFQL1SzB3G4a0li6lFGvlc5xGe1hY343bvG07cbpCzPuM/lK19FIJB3XGFSkplA==
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "^4.3.1"
|
debug "^4.1.1"
|
||||||
glob "^7.1.7"
|
glob "^7.1.6"
|
||||||
is-glob "^4.0.1"
|
is-glob "^4.0.1"
|
||||||
resolve "^1.20.0"
|
resolve "^1.17.0"
|
||||||
tsconfig-paths "^3.9.0"
|
tsconfig-paths "^3.9.0"
|
||||||
|
|
||||||
eslint-module-utils@^2.7.2:
|
eslint-module-utils@^2.7.0:
|
||||||
version "2.7.3"
|
version "2.7.3"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee"
|
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee"
|
||||||
integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==
|
integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==
|
||||||
|
@ -908,26 +916,26 @@ eslint-module-utils@^2.7.2:
|
||||||
debug "^3.2.7"
|
debug "^3.2.7"
|
||||||
find-up "^2.1.0"
|
find-up "^2.1.0"
|
||||||
|
|
||||||
eslint-plugin-import@^2.25.2:
|
eslint-plugin-import@2.25.2:
|
||||||
version "2.25.4"
|
version "2.25.2"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.2.tgz#b3b9160efddb702fc1636659e71ba1d10adbe9e9"
|
||||||
integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==
|
integrity sha512-qCwQr9TYfoBHOFcVGKY9C9unq05uOxxdklmBXLVvcwo68y5Hta6/GzCZEMx2zQiu0woKNEER0LE7ZgaOfBU14g==
|
||||||
dependencies:
|
dependencies:
|
||||||
array-includes "^3.1.4"
|
array-includes "^3.1.4"
|
||||||
array.prototype.flat "^1.2.5"
|
array.prototype.flat "^1.2.5"
|
||||||
debug "^2.6.9"
|
debug "^2.6.9"
|
||||||
doctrine "^2.1.0"
|
doctrine "^2.1.0"
|
||||||
eslint-import-resolver-node "^0.3.6"
|
eslint-import-resolver-node "^0.3.6"
|
||||||
eslint-module-utils "^2.7.2"
|
eslint-module-utils "^2.7.0"
|
||||||
has "^1.0.3"
|
has "^1.0.3"
|
||||||
is-core-module "^2.8.0"
|
is-core-module "^2.7.0"
|
||||||
is-glob "^4.0.3"
|
is-glob "^4.0.3"
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
object.values "^1.1.5"
|
object.values "^1.1.5"
|
||||||
resolve "^1.20.0"
|
resolve "^1.20.0"
|
||||||
tsconfig-paths "^3.12.0"
|
tsconfig-paths "^3.11.0"
|
||||||
|
|
||||||
eslint-plugin-jsx-a11y@^6.5.1:
|
eslint-plugin-jsx-a11y@6.5.1:
|
||||||
version "6.5.1"
|
version "6.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz#cdbf2df901040ca140b6ec14715c988889c2a6d8"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz#cdbf2df901040ca140b6ec14715c988889c2a6d8"
|
||||||
integrity sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==
|
integrity sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==
|
||||||
|
@ -945,15 +953,15 @@ eslint-plugin-jsx-a11y@^6.5.1:
|
||||||
language-tags "^1.0.5"
|
language-tags "^1.0.5"
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
|
|
||||||
eslint-plugin-react-hooks@^4.3.0:
|
eslint-plugin-react-hooks@4.3.0:
|
||||||
version "4.3.0"
|
version "4.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172"
|
||||||
integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==
|
integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==
|
||||||
|
|
||||||
eslint-plugin-react@^7.27.0:
|
eslint-plugin-react@7.29.1:
|
||||||
version "7.29.3"
|
version "7.29.1"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.3.tgz#f4eab757f2756d25d6d4c2a58a9e20b004791f05"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.1.tgz#6c40bc83142bb63d132a1b3565e2ea655411f800"
|
||||||
integrity sha512-MzW6TuCnDOcta67CkpDyRfRsEVx9FNMDV8wZsDqe1luHPdGTrQIUaUXD27Ja3gHsdOIs/cXzNchWGlqm+qRVRg==
|
integrity sha512-WtzRpHMhsOX05ZrkyaaqmLl2uXGqmYooCfBxftJKlkYdsltiufGgfU7uuoHwR2lBam2Kh/EIVID4aU9e3kbCMA==
|
||||||
dependencies:
|
dependencies:
|
||||||
array-includes "^3.1.4"
|
array-includes "^3.1.4"
|
||||||
array.prototype.flatmap "^1.2.5"
|
array.prototype.flatmap "^1.2.5"
|
||||||
|
@ -1240,7 +1248,7 @@ glob@7.1.7:
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
glob@^7.1.3, glob@^7.1.6, glob@^7.1.7:
|
glob@^7.1.3, glob@^7.1.6:
|
||||||
version "7.2.0"
|
version "7.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023"
|
||||||
integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==
|
integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==
|
||||||
|
@ -1574,7 +1582,7 @@ is-callable@^1.1.4, is-callable@^1.2.4:
|
||||||
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945"
|
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945"
|
||||||
integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==
|
integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==
|
||||||
|
|
||||||
is-core-module@^2.2.0, is-core-module@^2.8.0, is-core-module@^2.8.1:
|
is-core-module@^2.2.0, is-core-module@^2.7.0, is-core-module@^2.8.1:
|
||||||
version "2.8.1"
|
version "2.8.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211"
|
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211"
|
||||||
integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==
|
integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==
|
||||||
|
@ -2980,7 +2988,7 @@ resolve-url@^0.2.1:
|
||||||
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
|
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
|
||||||
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
|
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
|
||||||
|
|
||||||
resolve@^1.20.0:
|
resolve@^1.13.1, resolve@^1.17.0, resolve@^1.20.0:
|
||||||
version "1.22.0"
|
version "1.22.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198"
|
||||||
integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==
|
integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==
|
||||||
|
@ -3267,7 +3275,17 @@ trough@^2.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/trough/-/trough-2.1.0.tgz#0f7b511a4fde65a46f18477ab38849b22c554876"
|
resolved "https://registry.yarnpkg.com/trough/-/trough-2.1.0.tgz#0f7b511a4fde65a46f18477ab38849b22c554876"
|
||||||
integrity sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==
|
integrity sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==
|
||||||
|
|
||||||
tsconfig-paths@^3.12.0, tsconfig-paths@^3.9.0:
|
tsconfig-paths@^3.11.0:
|
||||||
|
version "3.14.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz#4fcc48f9ccea8826c41b9ca093479de7f5018976"
|
||||||
|
integrity sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==
|
||||||
|
dependencies:
|
||||||
|
"@types/json5" "^0.0.29"
|
||||||
|
json5 "^1.0.1"
|
||||||
|
minimist "^1.2.0"
|
||||||
|
strip-bom "^3.0.0"
|
||||||
|
|
||||||
|
tsconfig-paths@^3.9.0:
|
||||||
version "3.13.0"
|
version "3.13.0"
|
||||||
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.13.0.tgz#f3e9b8f6876698581d94470c03c95b3a48c0e3d7"
|
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.13.0.tgz#f3e9b8f6876698581d94470c03c95b3a48c0e3d7"
|
||||||
integrity sha512-nWuffZppoaYK0vQ1SQmkSsQzJoHA4s6uzdb2waRpD806x9yfq153AdVsWz4je2qZcW+pENrMQXbGQ3sMCkXuhw==
|
integrity sha512-nWuffZppoaYK0vQ1SQmkSsQzJoHA4s6uzdb2waRpD806x9yfq153AdVsWz4je2qZcW+pENrMQXbGQ3sMCkXuhw==
|
||||||
|
|
Loading…
Reference in a new issue