Skip to content

Commit

Permalink
tested with create-react-play
Browse files Browse the repository at this point in the history
  • Loading branch information
koustov committed Jul 7, 2022
1 parent 6c91066 commit 2595ae3
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ yarn.lock
# nhost
.nhost

# play inde
/src/plays/index.js
# play index
src/plays/index.js
18 changes: 2 additions & 16 deletions src/common/components/PlayForms.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {Chip, Autocomplete, TextField, InputLabel , MenuItem , FormControl , Select} from '@mui/material';
import {TextField , MenuItem , FormControl , Select, Button} from '@mui/material';
import { useEffect, useState } from 'react';


const PlayForm = ({fields, data, onChange}) => {

const [formData, setFormData] = useState({})
Expand Down Expand Up @@ -46,20 +45,7 @@ const PlayForm = ({fields, data, onChange}) => {
}
</Select>
</FormControl>
case 'fileupload': return <span><input
accept="image/*"
className={classes.input}
style={{ display: 'none' }}
id="raised-button-file"
multiple
type="file"
/>
<label htmlFor="raised-button-file">
<Button variant="raised" component="span" className={classes.button}>
Upload
</Button>
</label>
</span>

}

}
Expand Down
3 changes: 2 additions & 1 deletion src/common/playlists/PlayMeta.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { submit } from "common/services/request";
import Loader from "common/spinner/spinner";
import { toKebabCase, toPascalcase, toTitleCase } from "common/services/string";
import { FetchPlaysByID } from "common/services/request/query/fetch-plays";
import {PageNotFound} from 'common'

function PlayMeta() {
const [loading, setLoading] = useState(true)
Expand Down Expand Up @@ -57,7 +58,7 @@ function PlayMeta() {
return <Loader />;
}
if (isError) {
return <plays.PageNotFound />;
return <PageNotFound />;
}

const renderPlayComponent = () => {
Expand Down
1 change: 0 additions & 1 deletion src/common/routing/RouteDefs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
Home,
PlayMeta,
DefMeta,
PageNotFound,
PlayIdeas,
CreatePlay,
PlayCreated
Expand Down
30 changes: 30 additions & 0 deletions src/plays/dev-test-play-js/dev-test-play-js.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import PlayHeader from 'common/playlists/PlayHeader';
import './styles.css';

function devTestPlayJs(props) {

// Your Code Start below.

return (
<>
<div className="play-details">
<PlayHeader play={props} />
<div className="play-details-body">
{/* Your Code Starts Here */}
<div>
<h1>Play Details - Dev Test Play Js</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Pellentesque euismod, urna eu tincidunt consectetur,
nisi nunc ultricies nisi, eget consectetur nunc nisi
euismod nunc.
</p>
</div>
{/* Your Code Ends Here */}
</div>
</div>
</>
);
}

export default devTestPlayJs;
27 changes: 27 additions & 0 deletions src/plays/dev-test-play-js/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dev Test Play JS

Try not to delete this play. This will be used by developers for testing

## Play Demographic

- Language: js
- Level: Intermediate

## Creator Information

- User: koustov
- Gihub Link: https://github.com/koustov
- Blog: koustov
- Video: koustov

## Implementation Details

Update your implementation idea and details here

## Consideration

Update all considerations(if any)

## Resources

Update external resources(if any)
1 change: 1 addition & 0 deletions src/plays/dev-test-play-js/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* enter stlyes here */

0 comments on commit 2595ae3

Please sign in to comment.