Skip to content

Commit fa5f2cf

Browse files
committed
unbreak login
1 parent 67f7f83 commit fa5f2cf

5 files changed

Lines changed: 10 additions & 11 deletions

File tree

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const plugins = [
1616
}),
1717
resolve({ extensions: [".js", ".jsx"] }),
1818
commonjs(),
19-
terser()
19+
process.env.production && terser()
2020
];
2121

2222
export default {

src/components/NavBar.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ export default () => {
3535
>
3636
<li class="nav-item">
3737
<NavLink class="nav-link" route="editor">
38-
<i class="ion-compose"></i>&nbsp;New Post
38+
<i class="ion-compose"></i> New Post
3939
</NavLink>
4040
</li>
4141
<li class="nav-item">
4242
<NavLink class="nav-link" route="settings">
43-
<i class="ion-gear-a"></i>&nbsp;Settings
43+
<i class="ion-gear-a"></i> Settings
4444
</NavLink>
4545
</li>
4646
<li class="nav-item">
4747
<NavLink class="nav-link" route="profile" href={`@${store.currentUser.username}`}>
48-
<i class="ion-compose"></i>&nbsp;{store.currentUser}
48+
{store.currentUser.username}
4949
</NavLink>
5050
</li>
5151
</Show>

src/pages/Article/Article.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { createState } from "solid-js";
22
import marked from "marked";
33
import NavLink from "../../components/NavLink";
4+
import ListErrors from "../../components/ListErrors";
45
import { useStore } from "../../store";
56

67
const ArticleActions = props => {
@@ -107,7 +108,7 @@ const CommentInput = props => {
107108
class="form-control"
108109
placeholder="Write a comment..."
109110
value={state.body}
110-
disabled={store.isCreatingComment}
111+
disabled={state.isCreatingComment}
111112
onChange={handleBodyChange}
112113
rows="3"
113114
/>
@@ -135,7 +136,7 @@ const CommentContainer = props => (
135136
</p>
136137
}
137138
>
138-
<list-errors errors={props.errors} />
139+
<ListErrors errors={props.errors} />
139140
<CommentInput slug={props.slug} currentUser={props.currentUser} />
140141
</Show>
141142
<For each={props.comments}>

src/pages/Profile/Profile.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default ({ username }) => {
2626
<p>{store.profile?.bio}</p>
2727
{isUser && (
2828
<NavLink
29-
to="/settings"
29+
route="settings"
3030
class="btn btn-sm btn-outline-secondary action-btn"
3131
>
3232
<i class="ion-gear-a" /> Edit Profile Settings
@@ -41,9 +41,7 @@ export default ({ username }) => {
4141
}}
4242
onClick={handleClick}
4343
>
44-
<i class="ion-plus-round" />
45-
&nbsp;
46-
{store.profile?.following ? "Unfollow" : "Follow"} {store.profile?.username}
44+
<i class="ion-plus-round" /> {store.profile?.following ? "Unfollow" : "Follow"} {store.profile?.username}
4745
</button>
4846
)}
4947
</div>

src/store/createCommon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function createCommon(agent, store, loadState, setState) {
77
});
88
createEffect(() => {
99
if (state.token) {
10-
window.localStorage.setItem("jwt", token);
10+
window.localStorage.setItem("jwt", state.token);
1111
} else {
1212
window.localStorage.removeItem("jwt");
1313
}

0 commit comments

Comments
 (0)