Skip to content

Commit 30be32a

Browse files
committed
feat: add sample csv
1 parent 69d781d commit 30be32a

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

dashboard/public/sample.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

dashboard/src/components/InviteMembersModal.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { useDropzone } from 'react-dropzone';
2929
import { escape } from 'lodash';
3030
import { validateEmail, validateURI } from '../utils';
3131
import { InviteMembers } from '../graphql/mutation';
32-
import { ArrayInputOperations, csvDemoData } from '../constants';
32+
import { ArrayInputOperations } from '../constants';
3333
import parseCSV from '../utils/parseCSV';
3434

3535
interface stateDataTypes {
@@ -332,9 +332,7 @@ const InviteMembersModal = ({
332332
<Text size="xs">
333333
Download{' '}
334334
<Link
335-
href={`data:text/csv;charset=utf-8,${escape(
336-
csvDemoData
337-
)}`}
335+
href={`/dashboard/public/sample.csv`}
338336
download="sample.csv"
339337
color="blue.600"
340338
onClick={(e) => e.stopPropagation()}

dashboard/src/constants.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,3 @@ export const ECDSAEncryptionType = {
8989
ES384: 'ES384',
9090
ES512: 'ES512',
9191
};
92-
93-
export const csvDemoData = `[email protected]
94-
95-
96-
97-

server/routes/routes.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func InitRouter() *gin.Engine {
4444
{
4545
dashboard.Static("/favicon_io", "dashboard/favicon_io")
4646
dashboard.Static("/build", "dashboard/build")
47+
dashboard.Static("/public", "dashboard/public")
4748
dashboard.GET("/", handlers.DashboardHandler())
4849
dashboard.GET("/:page", handlers.DashboardHandler())
4950
}

0 commit comments

Comments
 (0)