Skip to content

Commit

Permalink
fix: restructured
Browse files Browse the repository at this point in the history
  • Loading branch information
JureSotosek committed Sep 16, 2018
1 parent 9d5225a commit e108a13
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions src/emma.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,55 @@ const PROGRESS_ERROR = 3;
const FOCUSED_SEARCH = 0;
const FOCUSED_SUGGESTIONS = 1;

// Info

const EmptyQuery = () => (
<div>
<Text grey>{'Try typing in to search the database.'}</Text>
</div>
);

const NoSelectedPackages = () => (
<div>
<Text grey>{'Select packages to get suggestions.'}</Text>
</div>
);

const NotFoundSearchInfo = () => (
<div>
<Text grey>
{"We couldn't find any package that would match your input..."}
</Text>
</div>
);

const NotFoundSuggestionsInfo = () => (
<div>
<Text grey>
{
"We couldn't suggest any package that would match your picked packages..."
}
</Text>
</div>
);

const ErrorInfo = ({ err }) => (
<div>
<Text red>
{'Error: '}
{err}
</Text>
</div>
);

const AlgoliaInfo = () => (
<div>
<Text>{'Search powered by'}</Text>
<Text blue>{' Algolia'}</Text>
<Text>{'.'}</Text>
</div>
);

// Package

const PackageAttribute = ({ pkg, attr, ...props }) => (
Expand Down Expand Up @@ -159,55 +208,6 @@ const SuggestionsResults = ({ foundPackages, onToggle, loading, focused }) => {
);
};

// Info

const EmptyQuery = () => (
<div>
<Text grey>{'Try typing in to search the database.'}</Text>
</div>
);

const NoSelectedPackages = () => (
<div>
<Text grey>{'Select packages to get suggestions.'}</Text>
</div>
);

const NotFoundSearchInfo = () => (
<div>
<Text grey>
{"We couldn't find any package that would match your input..."}
</Text>
</div>
);

const NotFoundSuggestionsInfo = () => (
<div>
<Text grey>
{
"We couldn't suggest any package that would match your picked packages..."
}
</Text>
</div>
);

const ErrorInfo = ({ err }) => (
<div>
<Text red>
{'Error: '}
{err}
</Text>
</div>
);

const AlgoliaInfo = () => (
<div>
<Text>{'Search powered by'}</Text>
<Text blue>{' Algolia'}</Text>
<Text>{'.'}</Text>
</div>
);

// Emma

class Emma extends Component {
Expand Down

0 comments on commit e108a13

Please sign in to comment.