From 293dff45f45a492d5633d38111c85267aeb70252 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 18 Jul 2022 14:08:39 +0900 Subject: [PATCH] add export button --- app/pages/projects/[projectId].tsx | 31 ++++++++++- app/pages/stubs/[stubId].tsx | 22 +++++++- package-lock.json | 87 +++++++++++++++++++----------- package.json | 2 + 4 files changed, 110 insertions(+), 32 deletions(-) diff --git a/app/pages/projects/[projectId].tsx b/app/pages/projects/[projectId].tsx index f62be98..588747a 100644 --- a/app/pages/projects/[projectId].tsx +++ b/app/pages/projects/[projectId].tsx @@ -9,6 +9,7 @@ import { useMutation, Routes, usePaginatedQuery, + invoke, } from "blitz" import Layout from "app/core/layouts/Layout" import getProject from "app/projects/queries/getProject" @@ -32,8 +33,15 @@ import { Text, } from "@chakra-ui/react" import { HiViewGridAdd, HiOutlineClipboardCopy } from "react-icons/hi" -import { ChevronLeftIcon, ChevronRightIcon, DeleteIcon, EditIcon } from "@chakra-ui/icons" +import { + ChevronLeftIcon, + ChevronRightIcon, + DeleteIcon, + EditIcon, + DownloadIcon, +} from "@chakra-ui/icons" import { CopyToClipboard } from "react-copy-to-clipboard" +import { saveAs } from "file-saver" const BreadCrumb = ({ project }) => { return ( @@ -148,6 +156,27 @@ export const Project = () => { EDIT + +