Skip to content

Commit

Permalink
fix metadata import in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
jodeleeuw committed Aug 2, 2024
1 parent 968ca96 commit 963b234
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"@jspsych/metadata": "^0.0.1"
},
"devDependencies": {
"@types/react": "^18.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Upload from "./pages/Upload.tsx";
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';
import ViewOptions from "./pages/ViewOptions.tsx";
import { useState } from 'react';
import './App.css'
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/Preview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';

interface PreviewProps {
jsPsychMetadata: JsPsychMetadata;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/popups/AuthorPopup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';
import React, { useState } from 'react';

type AuthorPopup = {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/popups/FieldPopup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';
import React, { useState } from 'react';

type FieldPopup = {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/popups/ListPopup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';
import React, { useState } from 'react';
import Trash from '../../assets/trash.svg'

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/popups/VariablePopup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react';
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';

type VariablePopup = {
jsPsychMetadata: JsPsychMetadata; // maybe unnecesssary
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/upload/AuthorForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { AuthorFields } from '../../../../metadata/dist/AuthorsMap';
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';

interface AuthorFormProps {
jsPsychMetadata: JsPsychMetadata;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/upload/PromptForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react';
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';

interface PromptFormProps {
jsPsychMetadata: JsPsychMetadata;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/upload/UploadData.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';
import React, { useState, useRef, useEffect } from 'react';

type UploadDataProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/upload/UploadMetadata.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';
import { useState } from 'react'

type UploadMetadataProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/Options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import FieldPopup, { FieldFormData } from '../components/popups/FieldPopup';
import AuthorPopup, { AuthorFormData } from '../components/popups/AuthorPopup';
import VariablePopup, { VariableFormData } from '../components/popups/VariablePopup';
import ListPopup from '../components/popups/ListPopup';
import JsPsychMetadata, { AuthorFields, VariableFields } from 'metadata';
import JsPsychMetadata, { AuthorFields, VariableFields } from '@jspsych/metadata';

interface OptionsProps {
jsPsychMetadata: JsPsychMetadata;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/Upload.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UploadMetadata from '../components/upload/UploadMetadata.tsx';
import UploadData from '../components/upload/UploadData.tsx';
import JsPsychMetadata from 'metadata';
import JsPsychMetadata from '@jspsych/metadata';
import AuthorForm from '../components/upload/AuthorForm.tsx';
import { useState } from 'react';
import PromptForm from '../components/upload/PromptForm.tsx';
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/ViewOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import JsPsychMetadata from "metadata";
import JsPsychMetadata from "@jspsych/metadata";
import Preview from "../components/Preview";
import Options from "./Options";

Expand Down

0 comments on commit 963b234

Please sign in to comment.