diff --git a/components/core/SlatePreviewBlock.js b/components/core/SlatePreviewBlock.js
index 750e2e62..eea4ec64 100644
--- a/components/core/SlatePreviewBlock.js
+++ b/components/core/SlatePreviewBlock.js
@@ -197,7 +197,13 @@ export default class SlatePreviewBlock extends React.Component {
Public
) : (
-
+
Private
)
diff --git a/components/core/TabGroup.js b/components/core/TabGroup.js
index 557036db..72ea2440 100644
--- a/components/core/TabGroup.js
+++ b/components/core/TabGroup.js
@@ -37,7 +37,10 @@ export class TabGroup extends React.Component {
css={STYLES_TAB}
key={tab}
style={{
- opacity: this.props.value === i ? "100%" : "25%",
+ color:
+ this.props.value === i
+ ? Constants.system.black
+ : "rgba(0,0,0,0.25)",
}}
onClick={() => this.props.onChange(i)}
>
diff --git a/pages/api/slates/get-serialized.js b/pages/api/slates/get-serialized.js
index 298bf115..f31973c2 100644
--- a/pages/api/slates/get-serialized.js
+++ b/pages/api/slates/get-serialized.js
@@ -4,7 +4,7 @@ import * as Strings from "~/common/strings";
export default async (req, res) => {
let slate = await Data.getSlateById({ id: req.body.data.id });
- if (!slate) {
+ if (!slate || slate.error) {
return res.status(404).send({
decorator: "SLATE_NOT_FOUND",
error: true,
@@ -13,7 +13,7 @@ export default async (req, res) => {
slate = Serializers.slate(slate);
let user = await Data.getUserById({ id: slate.data.ownerId });
- if (!user) {
+ if (!user || user.error) {
return res.status(200).send({
decorator: "SLATE_OWNER_NOT_FOUND",
data: slate,
diff --git a/pages/api/users/get-serialized.js b/pages/api/users/get-serialized.js
index b978f992..40e68412 100644
--- a/pages/api/users/get-serialized.js
+++ b/pages/api/users/get-serialized.js
@@ -4,7 +4,7 @@ import * as Strings from "~/common/strings";
export default async (req, res) => {
let user = await Data.getUserById({ id: req.body.data.id });
- if (!user) {
+ if (!user || user.error) {
return res.status(404).send({
decorator: "USER_NOT_FOUND",
error: true,
@@ -16,6 +16,14 @@ export default async (req, res) => {
userId: req.body.data.id,
publicOnly: true,
});
+ if (slates.error) {
+ if (!user || user.error) {
+ return res.status(404).send({
+ decorator: "SLATES_NOT_FOUND",
+ error: true,
+ });
+ }
+ }
user.slates = [];
for (let slate of slates) {
user.slates.push(Serializers.slate(slate));