Skip to content

loader and object data #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Lowerbar from "./Lowerbar";
import SegmentOne from "./SegmentOne";
import SegmentFour from "./SegmentFour";
import SegmentFive from "./SegmentFive";
import Loader from "./Loader";

$.fn.getDOMPath = function () {
let path = this.parents().addBack();
Expand Down Expand Up @@ -129,6 +130,7 @@ class App extends Component {
constructor() {
super();
this.state = {
loading: true,
serverUrl: '',
crawlUrl: '',
activeStep: 1,
Expand Down Expand Up @@ -341,6 +343,7 @@ class App extends Component {
}

componentDidMount() {

const App = this;

// Prevents default click event
Expand Down Expand Up @@ -388,13 +391,18 @@ class App extends Component {
highlightElement(App, position, DOMPath, styles, text);
selectElement(App, siblingSelector, DOMPath, styles, text, position);
});

setTimeout(() => this.setState({ loading: false }), 2000);

}

render() {
return (
<div className="App">
<div className="App-header">

{this.state.loading ?<Loader/>:null}

{/* <AuthModal trigger={<button>Authenticate</button>}/>
<SendDefinitionModal trigger={<button>Create API Endpoint</button>} address='localhost:4000'/> */}
<Toolbar closeFunc={this.closeEx} toggleLower={this.toggleLower} arrowDown={this.state.lowerBar} />
Expand Down
13 changes: 13 additions & 0 deletions src/components/Loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react'
import { Dimmer, Loader, Image, Segment } from 'semantic-ui-react'

const LoaderExampleLoader = () => (
<Dimmer page active inverted>
<Loader inverted size='large'>
Loading
</Loader>
</Dimmer>

)

export default LoaderExampleLoader